I used NSURLConnect in my app to start web service connection. I knew that apple deprecated this interface since ios 9.0 for more safty, while it also said a way to support http(add some para in xcode config to forbid ATS). I exactly did as it said, and it run well when I developed(use usb connect to ipad which run in ios 9).
My app was designed for inner net envirenment. I uploaded a vedio for detail introduce when I submit it to apple, because they certainly could not connect to my server. Nicely they approved my app.
Now I'm very glad to say my app is ready for sale. But when I setup it from app store and run, strange thing happens, it can not connect to the server! Through log I see the reason is no byte send succeefully by NSURLConnect sendSynchronousRequest. Why it runs well by devoloping, I am sure the code I submit is the same, and the ipad is run as ios 9.
I guess maybe I do something wrong during uploading. There is some info of my develop envirenment:
Build Active Architecture Only Debug Yes Release No
I use xcode Archive to upload. BTW, I have tested in ipad runs in ios 8.2 it was also not right.
As of 9.0 Apple made ssl a requirement but in the meantime provided a workaround.
Make sure your Info.plist
file has NSAppTransportSecurity added to it.
This example will allow you to make any connection.
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>