Okay, I know that there are many question about it, but they are all from many time ago.
So. I know that it is possible because the Map app does it.
In the M
UIApplicationOpenSettingsURLString
this will only work if you have previously allowed for any permission. For example Location, Photo, Contact, Push notification access. So if you have not such permission(s) from the user:
If iOS 10 or above,
It will open the Settings but then crash it. The reason, there's nothing in settings for your app.
Below code will open your application settings inside the iOS Setting.
NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
if ([[UIApplication sharedApplication] canOpenURL:url]) {
[[UIApplication sharedApplication] openURL:url];
}
Due to device unavailability, I couldn't check this on iOS < 10.
Also, I could find below code from some gist and it works fine on iOS 10 as well. But I am not sure if this will approve by Apple review team or not.
https://gist.github.com/johnny77221/bcaa5384a242b64bfd0b8a715f48e69f