Discussion Forums  >  Xcode, Errors, Installing, Configuring

Replies: 10    Views: 6220

Craig Conover
Aspiring developer
Profile
Posts: 56
Reg: Jan 01, 2013
Menlo Park, CA
4,310
09/23/15 11:36 PM (9 years ago)

Xcode 7, SSL error iOS 9, SSLHandshake, ERROR-1968, HTTP load failed

I am using Xcode Version 7.0 (7A220) to test run a BT app and the splash screen would load then the screen would be replaced with the following message: There was a problem downloading some required data. Try again? When I looked at the end (near the end) of the debug output I found these log lines: ++++++++ CFNetwork SSLHandshake failed (-9824) NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9824) BT_loadConfigDataViewController: the download process reported an error?: ERROR-1968: Code: -1200 Description: An SSL error has occurred and a secure connection to the server cannot be made. ++++++++ Where I work we have run into the SSLHandshake issue and we had to add some config to the plist to prevent this from happening. <key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>pubsub.pubnub.com</key> <dict> <key>NSExceptionAllowsInsecureHTTPLoads</key> <false/> <key>NSIncludesSubdomains</key> <true/> </dict> </dict> </dict> You would need to customize the "pubsub.pubnub.com" part but I did some googling and found a more concise version that worked to fix this for my BT app: <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> </dict> I did some searching on this forum but didn't find anything posted about this issue. I can't image I am the only one to hit this issue but perhaps I am the first? That would also surprise me. I found the above here: https://groups.google.com/forum/#!topic/parse-developers/x2HhN5W9u80 Just add that to your plist file, Clean, Test Run and it should work fin. Hope this help someone else. Cheers Craig
 
Craig Conover
Aspiring developer
Profile
Posts: 56
Reg: Jan 01, 2013
Menlo Park, CA
4,310
like
09/24/15 12:09 AM (9 years ago)
So I got past the test run SSLHandshake error with the above fix but deploying to the app store, I ran into new errors. I couldn't copy/paste the errors that Xcode displayed (thanks Xcode for make this as inconvenient as possible) but I will post a new issue on the forum tomorrow after I have time to research the issue. Assuming BT projects need to be updated for iOS9 or at least the new iPad dimensions (as that was what the error message seem to suggest).
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/24/15 12:38 AM (9 years ago)
Literally working on this as we speak.... The SSL Handshake "fix" by adding the appropriate values / excpetions / allowed domains in the .plist is part of it. No clue as to why it's OK on your dev. machine and simulator but not OK in the App Store. There should be no difference - right? A few other iOS 9-ee things are good to go in the newest BT Core update. I think this one is the last gotcha to nail down before the download server (that produces the projects in your control panel) can be updated. Stay tuned...
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/24/15 01:21 AM (9 years ago)
All the magic sauce is here: https://developer.apple.com/library/prerelease/ios/technotes/App-Transport-Security-Technote/ The combination I've had success with in the BT_info.plist file is: <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> <key>NSExceptionDomains</key> <dict> <key>www.buzztouch.com</key> <dict> <key>NSExceptionRequiresForwardSecrecy</key> <false/> <key>NSTemporaryExceptionMinimumTLSVersion</key> <string>TLSv1.2</string> <key>NSIncludesSubdomains</key> <true/> <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key> <false/> </dict> </dict> </dict> You can add those key / values manually, or, you can open the BT_info.plist file manually in a text editor and paste them with the other key / values. When you do this, then re-visit the .plist in your Xcode project you should see all the settings in the fancy-pants editor Xcode produces for working with .plist files. The Download server has been updated with these changes so new downloads should not have this issue. Naturally the domain name in these settings would be different if you're using your own machine / SSL configuration.
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
10/04/15 03:13 PM (9 years ago)
from what I understand is that with these lines: <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> you completely disable ATS, which is probably going to result in Apple not approving your app! All the ExceptionStuff underneath that is then completely worthless? I can confirm, that it works with disabling ATS though.
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
10/09/15 01:37 AM (9 years ago)
@David, Can you tell me what im doing wrong here please, ive downloaded fresh copy of my app yesterday, but im still getting the(there was a problem error) ive tried adding your code above but then tha app wont even launch, heres the info.plist, can you see whats wrong with it. <?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>Theatres</string> <key>CFBundleExecutable</key> <string>${EXECUTABLE_NAME}</string> <key>CFBundleIdentifier</key> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>uktheatres</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> <string>1.8</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>1.0</string> <key>LSRequiresIPhoneOS</key> <true/> <key>NSLocationAlwaysUsageDescription</key> <string>We use location information responsibly</string> <key>NSLocationWhenInUseUsageDescription</key> <string>We use location information responsibly</string> <key>UIRequiresFullScreen</key> <true/> <key>UISupportedInterfaceOrientations</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortraitUpsideDown</string> </array> <key>NSAppTransportSecurity</key> <string></string> <key>NSAllowsArbitraryLoads Bool</key> <dict/> <key>UIViewControllerBasedStatusBarAppearance</key> <true/> </dict> </plist>
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
10/09/15 03:32 AM (9 years ago)
All sorted now thanks david, followed your advice and it worked, just had to download and replace the new server plist over the old one and it worked like dream. Thanks David Sean
 
Slav
Apple Fan
Profile
Posts: 37
Reg: Sep 09, 2013
Toronto
370
like
10/15/15 10:28 AM (9 years ago)
I had the same problem, tried to copy and and paste David's combination of BT_info.plist file, no luck. I finally have success only after I've changed values to ones recommended at previous post https://www.buzztouch.com/forum/thread.php?fid=56E6F34FD963C9510A3C2E1&tid=56E6F34FD963C9510A3C2E1 Namely they were: <key>NSAllowsArbitraryLoads</key> <false/> <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key> <true/> That's all new for me, but hope this (my try and error result) may help someone
 
Nelson
Aspiring developer
Profile
Posts: 57
Reg: Jun 06, 2013
Viseu
2,220
like
10/27/15 07:01 PM (9 years ago)
I had same problem Just add <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> </dict> to the plist file. It is working. I do not know if it's the best way, but now is working normally, it is ok. No longer appears "There was a problem downloading some required data. Try again?"
 
Slav
Apple Fan
Profile
Posts: 37
Reg: Sep 09, 2013
Toronto
370
like
11/05/15 02:41 PM (9 years ago)
Changing values for NSAllowsArbitraryLoads to No and NSTemporaryExeptionAllowsInsecureHTTPLoads to Yes actually backfired: YouTube Streamer wouldn't work. I just removed URLs in BT_config for now. That's what I didn't like - the app would benefit from frequent updates (no need for constant submissions). But I couldn't figure out the other way.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
07/17/16 09:18 AM (8 years ago)
I had to change this one to true / yes <key>NSAllowsArbitraryLoads</key> <true/>
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.