简体   繁体   中英

ios 9, xcode 7 different behaviour when attached or not

I am migrating my app from ios 8 to ios 9 and I have found something strange, or at least it is the first time it happens to me and I have found no similar case.

I work with xcode 7 and ios 9. When I launch the app in an iphone 6 attached to xcode everything goes fine.

But if I do the same without attaching the app to xcode, it doesn't connect to my web service. The only difference is the iphone being attached to xcode or not.

I know I'm not giving much informatio, but any hint you could give me would be of great help.

Thanks in advance

Yes, to make your web services work, you need add one setting in your info.plist , see image below

在此处输入图片说明

For your ease the settings is

 NSAppTransportSecurity -> Dictionary NSAllowsArbitraryLoads -> Boolean -> YES 

Reference https://developer.apple.com/library/prerelease/ios/technotes/App-Transport-Security-Technote/

Cheers.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM