Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accessing the Settings app from your app in iOS 8?

Is it possible to access the settings app from your own app via a button or whatever it may be in iOS 8. I heard that it got decrepitude in iOS 5, is that true? If not did the method change in iOS 8? If there is not other way to do this what would be the best way to work around it?

like image 971
Ed3121577 Avatar asked Jun 15 '14 12:06

Ed3121577


People also ask

How do I get to my Settings app?

From the Home screen, tap the Menu Key > System settings.

How do I access apps on my iPhone 8?

Swipe left past all your Home Screen pages to see App Library, where your apps are organized by category. To open an app, tap its icon. To return to App Library, swipe up from the bottom edge of the screen (on an iPhone with Face ID) or press the Home button (on an iPhone with a Home button).


2 Answers

As of iOS 8, it is possible to take a user from your app directly into the Settings app. They will be deep linked into your app's specific Settings page, but they can back out into the top level Settings screen.

If you're also supporting iOS 7 you'll need to check first if a specific string constant is present.

UPDATE:

If your deployment target is set to 8.0 or above, Xcode 6.3 will give you the following warning:

Comparison of address of 'UIApplicationOpenSettingsURLString' not equal to a null pointer is always true 

This is because the feature was available starting in 8.0, so this pointer will never be NULL. If your deployment target is 8.0+, just remove the if statement below.

if (&UIApplicationOpenSettingsURLString != NULL) {     NSURL *appSettings = [NSURL URLWithString:UIApplicationOpenSettingsURLString];     [[UIApplication sharedApplication] openURL:appSettings]; }  
like image 151
djibouti33 Avatar answered Oct 10 '22 04:10

djibouti33


Use UIApplicationOpenSettingsURLString.

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]]; 
like image 22
David Beck Avatar answered Oct 10 '22 03:10

David Beck