1

Test flight downloaded app could not connect to the server. This work in locally. I am using http. also using ip Address to communicate to the server. I added all the App Transport security settings.

But apple document says: A domain name key for an exception dictionary:

  • Must be lowercased to work correctly
  • Must not include a port number
  • Must not be a numerical IP address (but rather a string)

But I only have IP to communicate.

Is any way to communicate IP address in http. It's work one month ago.

Sharat Kannan
  • 90
  • 2
  • 9
  • Is the IP address a device on the local network? Or is this some server that you simply don't have a domain for? – wottle Mar 01 '18 at 19:50

1 Answers1

0

If you are simply trying to access a server via the IP address you can use the zip.io service which will translate an IP to a domain (See: https://stackoverflow.com/a/33811464/3708242)

A DNS call to (for example) 10.0.1.8.xip.io will resolve to 10.0.1.8, allowing use of the domain instead of the IP address for the NSExceptionDomains key.

If, however, your app is using the IP address to communicate with a device on the local network, you can use the NSAllowsLocalNetworking exception in your ATS settings to allow the HTTP connection locally (documentation).

wottle
  • 13,095
  • 4
  • 27
  • 68