0

I am working on updating my app to ios 9 because it had a problem connecting to my server when the request were sent. It used to show the message: Transport security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.

So i've added some xml code to my plist file to correct the issue, as described in another stackoverflow post... Transport security has blocked a cleartext HTTP

After that, i still get another error saying : The data could not be read because it isn't in the correct format

I think this could be some problem in the reading process of the plist file, but i am also not sure about it. Here is the errors pictures and the plist on my app.

enter image description here

enter image description here

enter image description here

Community
  • 1
  • 1

1 Answers1

0

The suggested solution should works fine. Be sure to have typed it correctly. It should be in this form:

NSAppTransportSecurity NSAllowsArbitraryLoads

Also, please note that this is the laziest option available, since you can add per-site exceptions in the form:

<key>NSAppTransportSecurity</key>
<dict>
  <key>NSExceptionDomains</key>
  <dict>
    <key>yourserver.com</key>
    <dict>
      <!--Include to allow subdomains-->
      <key>NSIncludesSubdomains</key>
      <true/>
      <!--Include to allow HTTP requests-->
      <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
      <true/>
      <!--Include to specify minimum TLS version-->
      <key>NSTemporaryExceptionMinimumTLSVersion</key>
      <string>TLSv1.1</string>
    </dict>
  </dict>
</dict>

More on the dev forum https://forums.developer.apple.com/thread/3544

valvoline
  • 7,737
  • 3
  • 47
  • 52
  • I am having some trouble in the second error. Message "The data could not be read because it isn't in the correct format" is still showing up. Is there any other way to solve this problem? Thanks! – Alessandro Nardinelli Sep 02 '15 at 17:57