LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
10/03/15 04:35 PM (8 years ago)

App Transport Security

Hey there, uploaded my newest app to the AppStore, got approved and now wanted to download , but getting this error on app opening: appDownloadErrorTryAgain WOW... Problem is here: BT_loadConfigDataViewController: the download process reported an error?: ERROR-1968: Code: -1022 Description: The resource could not be loaded because the App Transport Security policy requires the use of a secure connection. and BT_loadConfigDataViewController: the download process reported an error?: ERROR-1968: Code: -1022 Description: The resource could not be loaded because the App Transport Security policy requires the use of a secure connection. Trying new setting in my info.plist now, but maybe somebody already found a solution. Not sure which URL is "unsecure" as using NSExceptions Stuff does not work with my self hosted domain inserted yet... Geez...
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
10/03/15 05:11 PM (8 years ago)
Disabling the whole AppTransportSecurity does the trick, but I do not think that Apple will approve my app now... Will have to check how to make my server secure I think? TLS 1.2?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
10/03/15 09:55 PM (8 years ago)
Hmm, yeah, this is a bit crazy with iOS 9. I've submited a few apps (dev work I'm doing) recently and had to make the adjustments in the .plist as described in some other posts. Guessing you've seen those. When you download a project from your control panel you'll see some additional key / values in the .plist that did not exist prior to iOS9. These are related to the appTransportSecurity issue. It's assumed you're using BT's backend when you download a project. As such, the NSExceptionDomains key is buzztouch.com. You may need to change this if you're fetching data from a different SSL server. It's all a bit unclear to many developers. This Apple Tech Note explains it clearly: https://developer.apple.com/library/prerelease/ios/technotes/App-Transport-Security-Technote/ The fact is, many devs are having trouble loading arbitrary data (think third party web sites) when using SSL. This is common when using UIWebViews to load content. What used to load fine prior to iOS 9 no longer loads. Ugh! So, if you're using BT's backend to load your apps main config file I'll bet you're alright. I'll also bet the appDownloadErrorTryAgain message you're seeing is related to content trying to load from a domain you're not aware of. Ad content in a webpage maybe?
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
10/04/15 01:30 AM (8 years ago)
Hey David, since when do I use the BT Backend;-) you have been on my self hosted before, have your own account. Hmm, maybe you.. Lol just kidding. Well will see what others put in their info list, but sure looks like I need to change my self hosted url to SSL to fix this without changements/uploading a new app version to Apple.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
10/04/15 01:43 AM (8 years ago)
I realize you have your own rig running but didn't know if you used both? Giggling. I'm able to download non-SSL data using using those transport entries. In other words, you don't NEED to use a secure URL, you just need to make sure iOS is "told" to allow the exception. Have you changed this: NSTemporaryExceptionAllowsInsecureHTTPLoads to true? It's set to false by default. iOS Wants us to only download SSL content into our apps. Changing that should instruct iOS to "allow non ssl download" Hope that makes sense.
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
10/04/15 01:46 AM (8 years ago)
I tried that exception stuff but did not work or I did it wrong? I only have 2 URL's in my app. My own selfhosted and a clients URL Ccc.co.at Hope the clients URL is not the problem? Really want to solve this without reupload anyway. Don't have any of these exception lines in my standard plist file though, but everything I added manually didn't change a thing.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
10/04/15 01:36 PM (8 years ago)
I am not sure if I have fully grasped the implication of this problem. I appreciate this has occurred on a newly created app, but does this mean that a lot of our existing apps will also fail on ios 9 devices? Are we all going to have to make plist adjustments and re-submit our apps?
 
aussiedra
Code is Art
Profile
Posts: 431
Reg: Dec 25, 2010
Brisbane, Austr...
8,260
like
10/04/15 07:48 PM (8 years ago)
one of my apps i only need the NSExceptionDomains for my self host. another app i needed 7 domains added. some plugins will need example the Youtube Playlist requires : akamaihd.net youtube.com amazonaws.com i found them using wireshark. so you could be in the same boat if you have extra plugins.
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
10/05/15 02:24 AM (8 years ago)
crazy... could you post the plist part here you added to make that work please? Both for self host only and the other one please. Regards Leon
 

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.