How to open settings app programmatically?

ios 11 open settings programmatically
ios open location settings programmatically
ios deep link to settings
ios open settings url
swift open network settings
ios open root settings
open location settings iphone
ios open control center programmatically

I'm using swift with ios 8.3. I want to open settings app from my application. I know that using the code

UIApplication.sharedApplication().openURL(NSURL(string: UIApplicationOpenSettingsURLString)!)

will open my app settings. But I don't want to open my app settings. I just want to open the settings app and stay in the main page. If possible, navigate to "Cellular". Is there any way to acheive this?

Try this.

if let appSettings = URL(string: UIApplicationOpenSettingsURLString) {, options: [:], completionHandler: nil)

Xcode 8.2.1 - iOS 10

How to open Settings programmatically like in Facebook app , You can't, there is no API call to do this. Only system dialogs, dialogs from Apple Frameworks, can open the settings app. In iOS 5 there was a  To display the Settings page programmatically, you can use the startActivityForResult method with an Intent object and a constant of the Settings, the following example should open the general settings menu of Android: startActivityForResult(new Intent(android.provider.Settings.ACTION_SETTINGS), 0); The usage of the ACTION_SETTINGS constant with startActivityForResult will show system settings. The Settings provider contains global system-level device preferences. Access specific settings

Update on 11-Oct-2016:

It won't work in iOS10 anymore. So far I haven't found any workaround. If you guys have any solution please let me know. thanks.


if the iOS version <= iOS9, you need set URL types:

You can do in this way:

    let url:NSURL! = NSURL(string : "prefs:root=")

I have a demo on github:

And you can find all available URLs as follows: Preferences app registers a private URL scheme, prefs:, the list below details opening specific views 1[2]


hope this helpful to you.

Open App Setting Programmatically, Open App Setting Programmatically. if let url = URL(string:UIApplication. opens the iPhone settings. - then jumps to the app settings inside the iphone settings. Used to create a URL that you can pass to the . openURL(_:) method. When you open the URL built from this string, the system launches the Settings app and displays the app’s custom settings, if it has any.

YES, They made changes in iOS 10, Please change "prefs:" to "App-Prefs:"

guard let profileUrl = URL(string:"App-Prefs:root=General&path=ManagedConfigurationList") else {

if UIApplication.shared.canOpenURL(profileUrl) {, completionHandler: { (success) in
        print(" Profile Settings opened: \(success)")

How To Open Settings In iOS Programmatically, An iOS application I was developing required the user to change some of their settings. I wondered how to open the settings app smoothly from my own  Can I search a particular setting within Settings App and open that particular setting programmatically from my App? e.g. can I search OTG from my app in Settings of the phone? – Divya Gupta Jan 24 at 10:40

How To Open Settings Programmatically Swift iOS, You can open settings app programmatically in iOS8, but not in earlier versions of iOS. Swift: UIApplication.sharedApplication().openURL(NSURL(string:  This is not possible. You can open the App settings screen but not the permissions setting screen. Refer to this question for more explanations.. Here I am sharing code to open application setting screen,

ios - Opening the Settings app from another app, This takes me to the app settings for my app, but not the Wifi Settings. I have seen that you can open the Wifi page as a pref:root type url but that this is against  That is why it is able to the open the settings application. Here are a few related questions & articles: is it possible to open Settings App using openURL? Programmatically opening the settings app (iPhone) How can I open the Settings app when the user presses a button? iPhone: Opening Application Preferences Panel From App

Possible to programatically open up the Wifi page in Settings without , I have found the following guidance on stack overflow ------ You can open settings app programmatically in iOS8, but not in earlier versions of iOS. In Swift: Use the following URIs to open various pages of the Settings app. Note that whether a settings page is available varies by Windows SKU. Not all settings page available on Windows 10 for desktop are available on Windows 10 Mobile, and vice-versa.

  • hello, have you found any solution for open setting main page ?
  • No. I think there's no solution for my question
  • This should be marked as the correct answer; others use iOS internals that can result in App Store rejections.
  • this is opening my app settings on iOS 12
  • There is no way currently to open even the main Settings screen (using public API), only settings of your app in Settings.
  • That code is what I am using now. Sachin Rocken, could you paste your code here? Let's see what is the problem.
  • let url:NSURL! = NSURL(string : "prefs:root=General") UIApplication.sharedApplication().openURL(url) That doesn't work.
  • @User9527 , I tried your code. In viewdidload I used let url:NSURL! = NSURL(string : "prefs:root=") UIApplication.sharedApplication().openURL(url) and it's not working. I don't know how it's working for you. Could you please give a sample project using any sharing services available.
  • @Sachin Rocken, I made a demo in github, please check if it works with
  • Have anybody got the solution for iOS 10?
  • This is a hack and will result in rejection from App Store.
  • hoo really, Thanks for your information Sibir, Is there any alternative for this?
  • @BoosaRamesh Doesn't look like it. :(