Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/108.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 设备9.0上的NSURLSession/NSURLConnection HTTP加载失败_Ios_Xcode_Cordova_Ionic Framework - Fatal编程技术网

Ios 设备9.0上的NSURLSession/NSURLConnection HTTP加载失败

Ios 设备9.0上的NSURLSession/NSURLConnection HTTP加载失败,ios,xcode,cordova,ionic-framework,Ios,Xcode,Cordova,Ionic Framework,我正在使用cordova/ionic开发一个应用程序,但由于iOS 9更新,我无法部署到设备上。我的应用程序在模拟器上运行,但无论我尝试什么,当我部署到设备上时,都会遇到相同的错误。我知道有很多关于这个问题的帖子,但是没有一个能够解决我的问题 是否有人使用相同的平台(ionic/cordova)遇到相同的问题 这就是我的.plist的外观: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//App

我正在使用cordova/ionic开发一个应用程序,但由于iOS 9更新,我无法部署到设备上。我的应用程序在模拟器上运行,但无论我尝试什么,当我部署到设备上时,都会遇到相同的错误。我知道有很多关于这个问题的帖子,但是没有一个能够解决我的问题

是否有人使用相同的平台(ionic/cordova)遇到相同的问题

这就是我的.plist的外观:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>CFBundleDisplayName</key>
    <string>${PRODUCT_NAME}</string>
    <key>CFBundleExecutable</key>
    <string>${EXECUTABLE_NAME}</string>
    <key>CFBundleIcons</key>
    <dict/>
    <key>CFBundleIcons~ipad</key>
    <dict/>
    <key>CFBundleIdentifier</key>
    <string>io.cordova.myappff160c</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>${PRODUCT_NAME}</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0.6</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>1.0.6</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>NSMainNibFile</key>
    <string/>
    <key>NSMainNibFile~ipad</key>
    <string/>
    <key>UISupportedInterfaceOrientations</key>
    <array>
      <string>UIInterfaceOrientationPortrait</string>
      <string>UIInterfaceOrientationPortraitUpsideDown</string>
    </array>
    <key>UISupportedInterfaceOrientations~ipad</key>
    <array>
      <string>UIInterfaceOrientationPortrait</string>
      <string>UIInterfaceOrientationPortraitUpsideDown</string>
    </array>
    <key>UIRequiresFullScreen</key>
    <true/>
    <key>NSAppTransportSecurity</key>
    <dict>
      <key>NSAllowsArbitraryLoads</key>
      <true/>
      <key>NSExceptionDomains</key>
      <dict>
        <key>m.facebook.com</key>
        <dict/>
        <key>graph.facebook.com</key>
        <dict/>
        <key>api.facebook.com</key>
        <dict/>
        <key>fbcdn.net</key>
        <dict>
          <key>NSIncludesSubdomains</key>
          <true/>
        </dict>
        <key>akamaihd.net</key>
        <dict>
          <key>NSIncludesSubdomains</key>
          <true/>
        </dict>
      </dict>
    </dict>
    <key>UIInterfaceOrientation</key>
    <array>
      <string>UIInterfaceOrientationPortrait</string>
    </array>
    <key>FacebookAppID</key>
    <string>xxxxxxxxxxxxxx</string>
    <key>FacebookDisplayName</key>
    <string>Birdy.life</string>
    <key>CFBundleURLTypes</key>
    <array>
      <dict>
        <key>CFBundleURLSchemes</key>
        <array>
          <string>fb1074874362552202</string>
        </array>
      </dict>
    </array>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string/>
    <key>UIBackgroundModes</key>
    <array>
      <string>remote-notification</string>
    </array>
  </dict>
</plist>

我唯一看到的就是飞溅屏幕,仅此而已。我是否遗漏了什么或是忽略了它?

我建议您在
NSAppTransportSecurity
Info.plist
设置中尝试一下。您收到的错误表明您的服务器没有使用最新和最好的TLS,或者以其他方式配置错误。我相信,当你开始指定比我下面的内容更多的内容时,你实际上是在限制事物,而不是使它们完全开放(我认为这是你想要的)

NSAppTransportSecurity
NSAllowsArbitraryLoads

请您再次检查问题,因为您提到的属性已经定义。我建议您删除“NSAppTransportSecurity”目录中的其他值。我猜这些值是为用户的某些受限访问添加的,但不确定。它们是特定的例外,但是他指定了一个更高级别的全局异常,因此它们对他的目的没有用处。但是您不觉得它与证书问题有关,因为错误表明它与SSL有关吗?您是否碰巧使用了https?好像是证书问题。
2016-05-30 17:31:53.465 Birdy[1102:584334] Apache Cordova native platform version 4.1.1 is starting.

2016-05-30 17:31:53.468 Birdy[1102:584334] Multi-tasking -> Device: YES, App: YES

2016-05-30 17:31:53.576 Birdy[1102:584334] Using UIWebView

2016-05-30 17:31:53.581 Birdy[1102:584334] [CDVTimer][handleopenurl] 0.264049ms

2016-05-30 17:31:53.588 Birdy[1102:584334] Unlimited access to network resources

2016-05-30 17:31:53.590 Birdy[1102:584334] [CDVTimer][intentandnavigationfilter] 7.857978ms

2016-05-30 17:31:53.591 Birdy[1102:584334] [CDVTimer][gesturehandler] 0.279963ms

2016-05-30 17:31:53.592 Birdy[1102:584334] Starting Facebook Connect plugin

2016-05-30 17:31:53.593 Birdy[1102:584334] [CDVTimer][facebookconnectplugin] 1.308978ms

2016-05-30 17:31:53.626 Birdy[1102:584334] [CDVTimer][splashscreen] 32.754004ms

2016-05-30 17:31:53.663 Birdy[1102:584334] [CDVTimer][localstorage] 35.548985ms

2016-05-30 17:31:53.664 Birdy[1102:584334] [CDVTimer][TotalPluginStartup] 84.178030ms

2016-05-30 17:31:53.973 Birdy[1102:584334] Resetting plugins due to page load.

2016-05-30 17:31:55.337 Birdy[1102:584398] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9813)

2016-05-30 17:31:55.340 Birdy[1102:584398] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9813)

2016-05-30 17:31:55.448 Birdy[1102:584398] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9813)

2016-05-30 17:31:55.711 Birdy[1102:584334] Finished load of: file:///var/containers/Bundle/Application/F5E4D8B5-7A45-4DA7-B7CE-CFC12DB7A5FF/Birdy.app/www/index.html#/public/home

2016-05-30 17:31:56.066 Birdy[1102:584392] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9813)

2016-05-30 17:31:56.126 Birdy[1102:584392] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9813)

2016-05-30 17:31:58.309 Birdy[1102:584398] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9813)
<key>NSAppTransportSecurity</key>
<dict>
  <key>NSAllowsArbitraryLoads</key>
  <true/>
</dict>