Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 11 URL Scheme for specific Settings section stopped working

My app uses a URL scheme to take users directly to Settings/General/About section, the following URL was working fine in 10.3.x.
"App-Prefs:root=General&path=About"

However, this URL scheme no longer works in iOS 11 GM build. It only launches the Settings app, but doesn't take user any further. Does anybody know if this is expected in iOS 11 official release? Thanks in advance.

like image 967
Ben Z. Avatar asked Sep 16 '17 12:09

Ben Z.


People also ask

How do I get iOS URL scheme?

Finding an App's Main URL Scheme Name First, you have to download the IPA file for the app, which requires macOS and Apple Configurator 2. When you finally find the IPA, you have to turn it into a ZIP file, show the contents of the app package, then hunt for the specific PLIST file that contains the scheme names.

How do I add a custom URL scheme to my iOS app?

Register your URL schemeRegister your scheme in Xcode from the Info tab of your project settings. Update the URL Types section to declare all of the URL schemes your app supports, as shown in the following illustration. In the URL Schemes box, specify the prefix you use for your URLs.

Does every app have a URL scheme?

Some app developers publish their universal URLs, and some do not. Not every app has a universal URL. (I.e., It may not be possible to create a 3rd-party app tile in Campus Cloud Studio to launch your app.)

What is URL scheme in iOS?

URL schema is used as an identifier in launching applications and performing a set of commands in iOS devices. The schema name of a URL is the first part of a URL. (e.g. schemaname:// ). For web pages, the schemas are usually http or https.


2 Answers

let url = NSURL(string: "app-settings:root=Privacy&path=LOCATION")! as URL
UIApplication.shared.open(url, options: [:], completionHandler: nil)

It works fine for me, iOS11 both on iPhone device and simulator.

"App-Prefs:" change to "app-settings:" then will work.

like image 152
lam kai man Avatar answered Sep 23 '22 13:09

lam kai man


This no longer works since iOS 11.

Here are the only things you can do currently:

Open the Settings app (whatever's written after the : is ignored)

UIApplication.shared.open(URL(string: "App-prefs:")!)

Open your App settings

UIApplication.shared.open(URL(string: UIApplication.openSettingsURLString)!)
like image 38
Ribesg Avatar answered Sep 22 '22 13:09

Ribesg