I'm trying to sign an app to run locally because development provisioning does not work for unspecified reasons.
I'm adding NSAllowsLocalNetworking
to the app transport security section of the entitlements and the result is that the selection to sign the app locally vanishes from the signing section in Xcode.
I need to access a local web application which does not provide HTTPS.
I'm not only very confused about this but actually pretty ******. Is this once again Apple playing games for absolutely no reason?
Why can't I build and run an application on my system that does not have to do anything with Apple, the app store, customers or anything? This is just for me and I cannot make it work.
I'm adding NSAllowsLocalNetworking to the app transport security section of the entitlements and the result is that the selection to sign the app locally vanishes from the signing section in Xcode.
Interesting. What version of Xcode is this?
I tried to reproduce this and things worked as I expected:
-
Using Xcode 16.0b6, I created a new project from the macOS > App template.
-
In Signing & Capabilities, it defaulted to automatic signing with Development in the popup. I switched that off, leaving Sign to Run Locally configurad.
-
I added the App Transport Security Capability.
-
It doesn’t let you enable
NSAllowsLocalNetworking
, so I selected theInfo.plist
file and added that manually. -
Back in Signing & Capabilities, Sign to Run Locally was still set.
Taking a step back:
development provisioning does not work for unspecified reasons.
It’s kinda important that you get this fixed. Sign to Run Locally can cause all sorts of weird issues. For example, you’ll likely encounter with local network privacy on macOS 15 (currently in beta).
… but:
I need to access a local web application which does not provide HTTPS.
You shouldn’t need to disable ATS to do that. Rather, it’s better to set up a test CA and have that issue your local server a certificate. You can then install your test CA’s root on the client, and you don’t need to mess around with ATS at all.
I talk about this in more detail in QA1948 HTTPS and Test Servers.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"