Git Product home page Git Product logo

ios-url-schemes's Introduction

List for iOS URLS SCHEMES

WARNING DEPRECATION

From iOS 11 the schemes url's stoped working correctly. Be aware that from iOS 11 to now iOS 14 this won't work.

Past times are always better

The gist I started on 2015 has now 201 stars (02/25/2017) and a lot of comments. But since gist does not provides a notification feature when someone comments and I can't answer right away, I hope with the issue area in github we can share more doubts and improvements. Thank You all!

Note

Apple will reject apps that are using private url schemes (Ugh, Apple....) if they are pretty much obvius. Some apps are rejected and others are not, so, be aware of this issue before implementing any of those URL's in your app as a feature.

Updates

  • [UPDATE 5] Apparently we're having problems with iOS 11 and schemes. it seems Apple changed one more time how we reach url schemes...some of them aren't working in mobile phones (but were working in simulator till' Xcode 9 GM)

  • [UPDATE 4] iOS 10 update: apparently settings now can be reached using App-Pref instead of prefs

  • [UPDATE 3: For now you just can use url schemes to open your apps's settings with Swift 3.0 (Xcode 8). I'll keep you informed when OS preferences can be reached]

  • [UPDATE 2:The openURL() method of UIApplication is now deprecated. You should use application(_:open:options:) instead]

  • [UPDATE : Not yet tested in iOS 10. It will fail because of policies changes in URL scheme handling.]

Testing

Download this Workflow to find and test new App-prefs: URL Schemes by @deanlyoung

Other Apps' Settings

Sometimes we need to open Setting's Preferences not of our app, but of the iPhone itself. What should we do to acomplish this?

keyboard

  1. You must configure the URL Schemes in your project. You will find it in Target, Info, URL Scheme. Once there, just type prefs

settings

2.- Later, just write the code with the URL path of the preference needed. In my case was the keyboard path.

Swift 1.2

   UIApplication.sharedApplication().openURL(NSURL(string:"prefs:root=General&path=Keyboard")!)

Swift 3.0

This is a work around to open your app's preferences, but it will crash if you don't have any.

Open apps's preferences:

Note: you don't need to add prefs text inside URL Types

    if #available(iOS 10.0, *) {
        UIApplication.shared.open(URL(string:UIApplicationOpenSettingsURLString)!)
    }

Open OS preferences:

   UIApplication.shared.open(URL(string:"App-prefs:root=General&path=Keyboard")!)

Swift 4.0

Open apps's preferences:

Note: you don't need to add prefs text inside URL Types

   if #available(iOS 10.0, *) {
     let settingsUrl = NSURL(string:UIApplicationOpenSettingsURLString)! as URL
     UIApplication.shared.open(settingsUrl, options: [:], completionHandler: nil)
   }

Open OS preferences:

    if #available(iOS 10.0, *) {
        let url = NSURL(string:"App-prefs:root=General&path=Keyboard")! as URL
        UIApplication.shared.open(url)
    }

Objective-c

  [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=General&path=Keyboard"]];

Open App's settings extension

extension UIApplication {
   
    func openAppSettings() {
        if let url = URL(string:UIApplicationOpenSettingsURLString) {
            openExpectedURL(url)
        }
    }
    
    fileprivate func openExpectedURL(_ url: URL) {
        if UIApplication.shared.canOpenURL(url) {
            if #available(iOS 10.0, *) {
                UIApplication.shared.open(url, options: [:], completionHandler: nil)
            }else{
                UIApplication.shared.openURL(url)
            }
        }
    }
    
}

More info:

URL Schemes

Description Command Swift < 3 OR Objc Swift 3
Settings Section topmost level From Widget (Prefs:) From App (App-prefs:)
About prefs:root=General&path=About App-prefs:root=General&path=About
Accessibility prefs:root=General&path=ACCESSIBILITY App-prefs:root=General&path=ACCESSIBILITY
Account Settings prefs:root=ACCOUNT_SETTINGS App-prefs:root=ACCOUNT_SETTINGS
Airplane Mode prefs:root=AIRPLANE_MODE App-prefs:root=AIRPLANE_MODE
Autolock iOS < 10 prefs:root=General&path=AUTOLOCK App-prefs:root=General&path=AUTOLOCK
Auto-Lock iOS > 10 prefs:root=DISPLAY&path=AUTOLOCK App-prefs:root=DISPLAY&path=AUTOLOCK
Apple Pay / Wallet shoebox://url-scheme shoebox://url-scheme
Battery prefs:root=BATTERY_USAGE App-prefs:root=BATTERY_USAGE
Brightness prefs:root=Brightness App-prefs:root=Brightness
Bluetooth iOS < 9 prefs:root=General&path=Bluetooth App-prefs:root=General&path=Bluetooth
Bluetooth iOS > 9 prefs:root=Bluetooth App-prefs:root=Bluetooth
Castle prefs:root=CASTLE App-prefs:root=CASTLE
Cellular Usage prefs:root=General&path=USAGE/CELLULAR_USAGE App-prefs:root=General&path=USAGE/CELLULAR_USAGE
Configuration List prefs:root=General&path=ManagedConfigurationList App-prefs:root=General&path=ManagedConfigurationList
Date and Time prefs:root=General&path=DATE_AND_TIME App-prefs:root=General&path=DATE_AND_TIME
Do not disturb prefs:root=General&path=DO_NOT_DISTURB App-prefs:root=General&path=DO_NOT_DISTURB
Facetime prefs:root=FACETIME App-prefs:root=FACETIME
General prefs:root=General App-prefs:root=General
Internet Tethering prefs:root=INTERNET_TETHERING App-prefs:root=INTERNET_TETHERING
iTunes prefs:root=MUSIC App-prefs:root=MUSIC
iTunes Equalizer prefs:root=MUSIC&path=EQ App-prefs:root=MUSIC&path=EQ
iTunes Volume prefs:root=MUSIC&path=VolumeLimit App-prefs:root=MUSIC&path=VolumeLimit
Keyboard prefs:root=General&path=Keyboard App-prefs:root=General&path=Keyboard
Deeper in Keyboard prefs:root=General&path=Keyboard/KEYBOARDS App-prefs:root=General&path=Keyboard/KEYBOARDS
Lang International prefs:root=General&path=INTERNATIONAL App-prefs:root=General&path=INTERNATIONAL
Location Services prefs:root=Privacy&path=LOCATION App-Prefs:root=Privacy&path=LOCATION
Mobile Data prefs:root=MOBILE_DATA_SETTINGS_ID
Network prefs:root=General&path=Network App-prefs:root=General&path=Network
Nike iPod prefs:root=NIKE_PLUS_IPOD App-prefs:root=NIKE_PLUS_IPOD
Notes prefs:root=NOTES App-prefs:root=NOTES
Notifications ID prefs:root=NOTIFICATIONS_ID App-prefs:root=NOTIFICATIONS_ID
Passcode / Touch ID prefs:root=TOUCHID_PASSCODE App-prefs:root=TOUCHID_PASSCODE
Passbook prefs:root=PASSBOOK App-prefs:root=PASSBOOK
Phone prefs:root=Phone App-prefs:root=Phone
Photo Camera Roll prefs:root=Photos App-prefs:root=Photos
Privacy Prefs:root=Privacy App-prefs:root=Privacy
Profiles & Device Management Prefs:root=General&path=ManagedConfigurationList App-prefs:root=General&path=ManagedConfigurationList
Reset prefs:root=General&path=Reset App-prefs:root=General&path=Reset
Ringtone prefs:root=Sounds&path=Ringtone App-prefs:root=Sounds&path=Ringtone
Siri prefs:root=SIRI App-prefs:root=SIRI
Safari prefs:root=Safari App-prefs:root=Safari
Siri iOS < 10? prefs:root=General&path=Assistant App-prefs:root=General&path=Assistant
Siri iOS > 10? prefs:root=SIRI App-prefs:root=SIRI
Sounds prefs:root=Sounds App-prefs:root=Sounds
Software Update prefs:root=General&path=SOFTWARE_UPDATE_LINK App-prefs:root=General&path=SOFTWARE_UPDATE_LINK
Storage & Backup prefs:root=CASTLE&path=STORAGE_AND_BACKUP App-prefs:root=CASTLE&path=STORAGE_AND_BACKUP
Store prefs:root=STORE App-pref:root=STORE
Twitter prefs:root=TWITTER App-prefs:root=TWITTER
Usage prefs:root=General&path=USAGE App-prefs:root=General&path=USAGE
Video prefs:root=VIDEO App-prefs:root=VIDEO
VPN prefs:root=General&path=Network/VPN App-prefs:root=General&path=Network/VPN
Wallpaper prefs:root=Wallpaper App-prefs:root=Wallpaper
WIFI prefs:root=WIFI App-prefs:root=WIFI

Open other App's Notification settings

You can open any app notification's settings, only if that app HAS notifications enabled. For that you need the bundleID added 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

Bluetooth

As @johnny77221 mention in comments, he impleted a way to open bluetooth settings, read in link above:

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

Apple Pay / Wallet

by @luismadrigal

shoebox://

Cordova Plugin

@guyromb made a cordova plugin

https://github.com/guyromb/Cordova-open-native-settings/blob/master/src/ios/NativeSettings.m

A cocopods plugin

it seems @yoiang made a plugin for cocoapods. Although it appears that is not updated to iOS > 10 but you can contribute to his project if you like it ;)

https://github.com/Adorkable/SettingsAppAccessiOS

Open App Store

   UIApplication.shared.openURL(URL(string: "itms-apps://itunes.apple.com/app/id" + appStoreAppID)!)

Contributions:

@antonjn, @mikengyn, @johnny77221, @luismadrigal, @guyromb, @yoiang, @deanlyoung, @axlmagnum

ios-url-schemes's People

Contributors

dineshkachhot avatar hansemannn avatar phynet avatar steverichey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ios-url-schemes's Issues

NOTIFICATIONS_ID not opening anymore?

Hi everyone,

I just updated to 11.4.1 and now App-prefs:root=NOTIFICATIONS_ID only brings me to the settings root. Are you getting a similar behavior or is it my fault?

Thanks!
Leonard

how can i open settings from today widget?

I got error msg:
[_NCWidgetExtensionContext openURL:completionHandler:]_block_invoke failed: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"
however i'v added URL 'prefs' into info.plist extension project
Could you help with this?

Settings opens in simulator but not in device iOS 11

"App-prefs:root=General&path=Keyboard"

This opens the keyboard settings in simulator but only opens the settings app in device.

Also I have removed the URL schemes of prefes and it still works in simulator but doesn't work in device.

Passcode & TouchID link?

Hi,

Thank you for creating and maintaining this list. One thing I was not able to find is the URL for passcode & touchId settings screen? Is is possible at all to open that screen from titanium or IOS blocks it somehow?

Locations Scheme not working IOS 11

Hi,
This url worked before. -> App-Prefs: root = Privacy & path = LOCATION
But on iOS 11 devices, only the settings screen is opened. Can you find a solution?

iOS 11: iPhone Storage

iOS 11 separates the iPhone and iCloud storage into different tabs. The following enters iCloud storage:

App-prefs:root=CASTLE&path=STORAGE_AND_BACKUP

What is the URL scheme for iPhone Storage?

iOS > 10.2

Cellular Data url scheme wasn't working for me till I found this method and now it's working correctly

Cellular Data:
App-prefs:root=MOBILE_DATA_SETTINGS_ID

Settings Section Topmost Level 2022

Apple will reject apps that are using private url schemes (Ugh, Apple....) if they are pretty much obvius. Some apps are rejected and others are not, so, be aware of this issue before implementing any of those URL's in your app as a feature.

Is there still no way to navigate to the settings app without getting rejected by the Apple Store?

Currently in development (ios 15.4) I am able to navigate to the settings section using App-prefs:.

App rejected!

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.

Specifically, your app uses the following non-public URL scheme:

app-prefs:root=touchid_passcode

Continuing to use or conceal non-public APIs in future submissions of this app may result in the termination of your Apple Developer account, as well as removal of all associated apps from the App Store.

Next Steps

To resolve this issue, please revise your app to provide the associated functionality using public APIs or remove the functionality using the "prefs:root" or "App-Prefs:root" URL scheme.

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.