Skip to content

Instantly share code, notes, and snippets.

@phynet
Last active September 28, 2024 02:20
Show Gist options
  • Save phynet/471089a51b8f940f0fb4 to your computer and use it in GitHub Desktop.
Save phynet/471089a51b8f940f0fb4 to your computer and use it in GitHub Desktop.
@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