0

I have an app which connects to a server to call APIs using IP address, I don't have a domain associated with it. I have tried following solution in plist.info file, but still i receive same error.

<key>NSAppTransportSecurity</key>
<dict>
   <key>NSAllowsArbitraryLoads</key>
   <true/>
</dict>

I want to know how i can escape this security policy in this case, this is our development server , we will associate domain name later while submitting app to store, I want to be able to test and develop.

NSLocalizedDescription=The resource could not be loaded because the App Transport Security policy requires the use of a secure connection

ocean
  • 1,335
  • 15
  • 26
vishal dharankar
  • 7,536
  • 7
  • 57
  • 93

1 Answers1

1

It looks like you can't use hard coded IP Addresses. Please refer to this answer for more info.

Hard-coded IP address wont work in iOS9. I also faced the same issue. Tried all permutations & combinations of available solutions. Finally, had to use a proper domain name.

Community
  • 1
  • 1
Rhuari Glen
  • 497
  • 2
  • 5
  • That is a false statement. I've been using IP addresses for the past several weeks with no issues at all. – Avi Aug 31 '16 at 11:50
  • @Avi Can you provide some evidence on how you have been doing that? If it is false then I will remove my answer. – Rhuari Glen Aug 31 '16 at 11:54
  • 1
    @avi this thing works with Xcode 6.0 without any issue , even I am using it , but my other machine has Xcode 7.2 and there it fails so it varies SDk to SDK , older SDKs it works, so please be gentle while using down vote – vishal dharankar Aug 31 '16 at 12:00
  • I am using it with Xcode 7.3.1, base SDK of 9.3. If you're not current, you should be. – Avi Aug 31 '16 at 12:54