Does ATS care about IP addresses?

I was reading another post, so if someone can clarify that would be great.


Does ATS apply to direct IP addresses? IE, calling NSURLSession with a URL like "http://192.700.200.21:8080/someRestService/somedata

where the URL is an IP address with numbers, not a DNS name or www.website.com or api.website.com address?


Thanks. Chris

Replies

It’s hard to answer this in the general case. For the specific example you posted, where you’re trying to connect to an IP address on the local network, you can opt out of ATS in that case using

NSAllowsLocalNetworking
.

If you have other cases you care about, please post the details.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I need to communicate also to a local device using IP.

I have set NSAllowsLocalNetworking. It works fine in http.


But it should work also in TLS 1.1 (https).

However it fails with error -9801 with kCFStreamErrorDomainKey=3


The connection is working fine with only NSArbitraryLoad=YES

I’ve responded via the other thread you posted to.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"