I am creating an app that runs on Mac using objective-c.
Since the app requires permission for location information, I used NSLocationUsageDescription
to display an OS alert prompting the user to allow location information.
When built, the app displays an OS alert prompting the user to allow location information, as expected.
However, after signing this app, it no longer displays alerts.
The signature was added like this.
codesign --force --timestamp --options runtime --sign "SIGN" "AppName"
Why does just adding a signature stop the OS alert prompting the user to allow location information to appear?
Also, is there a way to display OS alerts even with a signature?
You’re signing your app with the hardened runtime enabled (which is required for direct distribution using Developer ID signing). The hardened runtime enables a bunch of extra security checks. One of those is that you must claim the com.apple.security.personal-information.location
entilement if you want to use location services. See Hardened Runtime for the details.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"