danielebogo / DBPrivacyHelper

Quick tool to explain the right place to enable your privacy settings
MIT License
433 stars 60 forks source link

Under iOS 8 openPrivacyHelper jumps straight to the wrong page in the settings app #17

Open ronbarr opened 9 years ago

ronbarr commented 9 years ago

Hi,

I don't have any settings in the settings app. I am trying to show an issue for HealthKit. openPrivacyHelper skips the (very nice) notification and jumps to the notifications area of system settings.

I would much rather show the dialog always by default. I can use the more explicit command with default settings page set to NO, though, so this is very minor.

Thanks.

Ron

sybohy commented 9 years ago

:+1:

ryh commented 9 years ago

Should jump to app setting page with UIApplicationOpenSettingsURLString in iOS8

   [[UIApplication sharedApplication] openURL:[NSURL  URLWithString:UIApplicationOpenSettingsURLString]];
danielebogo commented 9 years ago

This is the code of the library:

if (IS_IOS_8 && defaultSettingPane) {
   if (&UIApplicationOpenSettingsURLString != NULL) {
      NSURL *appSettings = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
      [[UIApplication sharedApplication] openURL:appSettings];
      return;
   }
}