I\'m not inventing the wheel. In iOS8, to open Settings from inside the app I\'m using this code:
BOOL canOpenSettings = (&UIApplicationOpenSettingsURLSt
I believe this is because &UIApplicationOpenSettingsURLString is never nil in this version so you can just directly use the following to launch settings:
NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
[[UIApplication sharedApplication] openURL:url];
SOLVED:
The problem is related with the Deployment Target in the App.
If the Target is 8.0 or above, the comparison will be always true because you are always over 8.0. So we do not need the if verification:
NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
[[UIApplication sharedApplication] openURL:url];
Another option can be:
NSURL *settings = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
if ([[UIApplication sharedApplication] canOpenURL:settings])
{
[[UIApplication sharedApplication] openURL:settings];
}