我正在使用cordova / ionic开发应用程序,但由于iOS 9更新,我无法部署到设备。我的应用程序在模拟器上工作但我在尝试部署到设备时仍然遇到相同的错误。我知道有很多关于这个问题的帖子,但没有一个能够解决我的问题。
是否有人使用相同的平台(离子/ 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>
这是我在部署到设备时获得的输出:
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)
我唯一能看到的就是闪屏,以及它的相关内容。我错过了什么或者看过去了吗?
答案 0 :(得分:1)
我建议您尝试使用此NSAppTransportSecurity
Info.plist
设置。您收到的错误表明您的服务器没有使用最新和最好的TLS,或者以某种方式错误配置。我相信当你开始指定的东西比我下面的东西更多时,你实际上是限制事物,而不是让它们大开(我认为这就是你想要的)。
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>