Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@phynet
Copy link
Author

phynet commented Jul 11, 2016

@ltd920678778 I haven't tested it yet on iOS 10

@larsblumberg
Copy link

Our app got rejected during AppStore review because of using these non-public URL schemes:

Your app uses the "prefs:root=Bluetooth, prefs:root=WiFi" non-public URL scheme, which is a private entity. The use of non-public APIs is not permitted on the App Store because it can lead to a poor user experience should these APIs change.

@Jinxiansen
Copy link

me too .

Your app uses the "prefs:root=" non-public URL scheme, which is a private entity. The use of non-public APIs is not permitted on the App Store because it can lead to a poor user experience should these APIs change.

Next Steps

Please revise your app to provide the associated functionality using public APIs or remove the functionality using the "prefs:root" URL scheme.

If there are no alternatives for providing the functionality your app requires, we encourage you to file an enhancement request.

@aral
Copy link

aral commented Jul 17, 2016

Fails on iOS 10.

@raulsilvamx
Copy link

Thanks... You deserve a few 🍻 !!!

@phynet
Copy link
Author

phynet commented Jul 18, 2016

@larsblumberg and @Jinxiansen this was commented above (march 29th), sadly it seems it's not approved by Apple, and only those apps that won't be uploaded to Apple Store are using it.

@kennylugo
Copy link

Thanks you so much!

@mromanuk
Copy link

How do Google do to use it in the Gboard keyboard? They clearly use prefs:root=General&path=Keyboard/KEYBOARDS on the Container App.
I need that for the app I'm working on, works flawlessly in iOS9.x.

I can confirm that it doesn't work in simulator iOS10.x, anything with prefs:

@alexpersian
Copy link

alexpersian commented Aug 28, 2016

Causes a crash on iOS 10

This is confirmed to be using a private API as well and has a high likelihood of causing rejection in App Store reviews.

@mitchrsm
Copy link

any solution for iOS 10?

@phynet
Copy link
Author

phynet commented Sep 19, 2016

There's no solution for iOS 10 in access OS Settings yet.

@Saurabh102
Copy link

@phynet If here is not solution for iOS 10 how did you

@luismadrigal
Copy link

@phynet is there one for opening/launching ApplePay/Wallet in iOS 10? Prefs:root=PASSBOOK opens the settings for Wallet & Apple Pay and not the actual screen to make a payment.

@luismadrigal
Copy link

@phynet nevermind, it turns out that to open the Wallet you need to use the app's scheme which is shoebox://

Copy link

ghost commented Oct 25, 2016

shoebox:// confirmed working on iOS 10.1. I would need something similar for opening network settings. Great discovery, no official release yet.

@johnny77221
Copy link

since apple have no bluetooth option in per-app settings, I got a sample for opening bluetooth sample of the URL
which is objective c only

https://gist.github.com/johnny77221/bcaa5384a242b64bfd0b8a715f48e69f

@phynet
Copy link
Author

phynet commented Oct 28, 2016

Thanks @luismadrigal for the info, I will update the list when tested for objective-c (shoebox://)

Also, @jonny77221 I will check it out your contribution :D

@dimohamdy
Copy link

@phynet any update

@XweAponX
Copy link

XweAponX commented Jan 8, 2017

No url for Battery?

@antonjn
Copy link

antonjn commented Jan 19, 2017

Battery: "Prefs:root=BATTERY_USAGE"
Siri: "Prefs:root=SIRI"

@mikengyn
Copy link

mikengyn commented Feb 1, 2017

Using App-Prefs instead of just prefs is working in IOS 10.2. However i'm not sure if apple approves this or not.

@mahirekici
Copy link

App-Prefs is working in IOS 10.2

@phynet
Copy link
Author

phynet commented Mar 27, 2017

Thank you all for the collaboration. I've tested App-Prefs and it's working for Swift 3. You have the updated file now 💃

@andrewminchew
Copy link

Can you help me with this? I'm trying to write a workflow that jumps into the notifications settings for all my work apps in sequence so I can easily enable my work notifications at the start of each day. I've tried the following URL schemes but the only get me into the notifications, they don't go the extra step of opening the settings for the specified apps...

App-prefs:root=NOTIFICATIONS_ID&path=com.microsoft.lync2013.iphone
App-prefs:root=NOTIFICATIONS_ID&path=com.microsoft.Office.Outlook

i found the Bundle Name (?) using the app store look up url ex http://itunes.apple.com/lookup?id=

Can someone tell me what I'm doing wrong?

@phynet
Copy link
Author

phynet commented Mar 29, 2017

@andrewminchew you are in the right track. I've tested the scheme with an app that HAS notifications enabled (maybe that's the problem you have) and did open the notifications for that app. You need the bundleID pasted in path...

UIApplication.shared.openURL(NSURL(string:"App-prefs:root=NOTIFICATIONS_ID&path=com.microsoft.Office.Word")! as URL)

Finding an app's bundle identifier of any app:

Find the app you are looking for on the Apple AppStore. For this example, we’ll use Yelp: https://itunes.apple.com/us/app/yelp/id284910350?mt=8
Copy the app ID number. It’s just the numbers after the text “id” and before the “?”. So in this case, it is: 284910350.
Paste that ID number into this URL:
https://itunes.apple.com/lookup?id=284910350
This will download a file 1.txt
Search the output you get back for “bundleId”. The app’s bundle ID will be listed there: com.yelp.yelpiphone

source: https://kb.acronis.com/content/39368

@2Grey
Copy link

2Grey commented May 15, 2017

How can I use this schemes in Safari?

I tried to open link App-Prefs://root=General in Safari, and got:

Safari cannot open the page because the address is invalid.

@phynet
Copy link
Author

phynet commented May 16, 2017

@2Grey yo want to open a scheme from a safari website or navigator oriented app ? that's a little more complicated. I've never tried that, so I can't tell you how to do it. Let's hope someone else can help you with this.

@deanlyoung
Copy link

deanlyoung commented May 23, 2017

@phynet I made some more revisions/additions to keep things consistent and cleaner. See my fork for changes. Thanks!

edit: Also, a great way to find/test these is loading them into a Workflow. You can then also launch the shortcuts via the Widget or within the app.

@phynet
Copy link
Author

phynet commented May 25, 2017

Thank you for your colaboration @deanlyoung. I've updated the gist ;)

@nirmal98kumar
Copy link

Will my app be rejected if I upload to app store. Also does this work with ios 14+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment