I have a simple app running on ios simulator which will (at some point in the app), prompt the user to authorize the following:
There's some discussion here on this topic. I'll quote the relevant portion for posterity:
For CoreLocation, you can just call the following private method at some point before your first use:
[CLLocationManager setAuthorizationStatus:YES forBundleIdentifier:[[NSBundle mainBundle] bundleIdentifier]]Privacy alerts for contacts, photos and the calendar are handled differently. These can be set via
TCCAccessSetForBundlefromTCC.framework, but this function is not callable from within the same app whose privacy settings you're attempting to modify AFAICT.Instead, you can just sign your app with these entitlements:
com.apple.private.tcc.allow.overridable kTCCServiceAddressBook kTCCServiceCalendar kTCCServicePhotos To hide your app from the Simulator's Privacy Settings screens, replace
com.apple.private.tcc.allow.overridablewithcom.apple.private.tcc.allow.You probably don't want to include these entitlements in your AppStore build.
(Make sure to take this stuff out when you submit your app - or only include it in your debug target - because it won't pass app review.)