├── .gitignore ├── README.mkd └── URLSchemes ├── URLSchemes.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── s.swidar.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── s.swidar.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── URLSchemes.xcscheme │ └── xcschememanagement.plist └── URLSchemes ├── AppDelegate.swift ├── Assets.xcassets └── AppIcon.appiconset │ └── Contents.json ├── Base.lproj ├── LaunchScreen.storyboard └── Main.storyboard ├── Info.plist ├── Settings.bundle ├── Root.plist └── en.lproj │ └── Root.strings ├── URLSchemes.entitlements └── ViewController.swift /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | .DS_Store 3 | *.DS_Store 4 | .Trashes 5 | 6 | # c.f. http://www.westwind.com/reference/os-x/invisibles.html 7 | 8 | *.swp 9 | 10 | # 11 | # *.lock - this is used and abused by many editors for many different things. 12 | # For the main ones I use (e.g. Eclipse), it should be excluded 13 | # from source-control, but YMMV. 14 | # (lock files are usually local-only file-synchronization on the local FS that should NOT go in git) 15 | # c.f. the "OPTIONAL" section at bottom though, for tool-specific variations! 16 | 17 | *.lock 18 | .~lock.* 19 | 20 | 21 | # 22 | # .git 23 | # 24 | 25 | .git 26 | 27 | node_modules 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /README.mkd: -------------------------------------------------------------------------------- 1 | ## List for iOS URLS SCHEMES 2 | 3 | ## WARNING DEPRECATION 4 | From iOS 11 the schemes url's stoped working correctly. Be aware that from iOS 11 to now iOS 14 this won't work. 5 | 6 | 7 | ## Past times are always better 8 | The [gist](https://gist.github.com/phynet/471089a51b8f940f0fb4) 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! 9 | 10 | ### Note 11 | _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._ 12 | 13 | ### Updates 14 | 15 | * [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) 16 | 17 | * ~~[UPDATE 4] iOS 10 update: apparently settings now can be reached using App-Pref instead of prefs~~ 18 | 19 | * ~~[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]~~ 20 | 21 | * ~~*[UPDATE 2:The openURL() method of UIApplication is now deprecated. You should use application(_:open:options:) instead]*~~ 22 | 23 | * ~~*[UPDATE : Not yet tested in iOS 10. It will fail because of policies changes in URL scheme handling.]*~~ 24 | 25 | ### Testing 26 | 27 | Download [this Workflow](https://workflow.is/workflows/5e26afaedcb8497b898adb27b0b8ce9f) to find and test new `App-prefs:` URL Schemes by [@deanlyoung](https://gist.github.com/deanlyoung) 28 | 29 | ### Other Apps' Settings 30 | 31 | Sometimes we need to open Setting's Preferences not of our app, but of the iPhone itself. What should we do to acomplish this? 32 | 33 | 34 | ![keyboard](https://cloud.githubusercontent.com/assets/724536/9033179/41e2d7be-39c5-11e5-8c25-8d123923ae94.gif) 35 | 36 | 37 | 1. You must configure the URL Schemes in your project. You will find it in Target, Info, URL Scheme. Once there, just type **prefs** 38 | 39 | ![settings](https://cloud.githubusercontent.com/assets/724536/9033051/567a347a-39c4-11e5-9885-1e26460beab3.gif) 40 | 41 | 2.- Later, just write the code with the URL path of the preference needed. In my case was the keyboard path. 42 | 43 | ## Swift 1.2 44 | 45 | ```swift 46 | UIApplication.sharedApplication().openURL(NSURL(string:"prefs:root=General&path=Keyboard")!) 47 | ``` 48 | 49 | ## Swift 3.0 50 | 51 | This is a work around to open your app's preferences, but it will crash if you don't have any. 52 | 53 | Open apps's preferences: 54 | 55 | **Note: you don't need to add `prefs` text inside URL Types** 56 | 57 | ```swift 58 | if #available(iOS 10.0, *) { 59 | UIApplication.shared.open(URL(string:UIApplicationOpenSettingsURLString)!) 60 | } 61 | ``` 62 | 63 | 64 | Open OS preferences: 65 | 66 | ```swift 67 | UIApplication.shared.open(URL(string:"App-prefs:root=General&path=Keyboard")!) 68 | ``` 69 | 70 | ## Swift 4.0 71 | 72 | Open apps's preferences: 73 | 74 | **Note: you don't need to add `prefs` text inside URL Types** 75 | 76 | ```swift 77 | if #available(iOS 10.0, *) { 78 | let settingsUrl = NSURL(string:UIApplicationOpenSettingsURLString)! as URL 79 | UIApplication.shared.open(settingsUrl, options: [:], completionHandler: nil) 80 | } 81 | ``` 82 | 83 | Open OS preferences: 84 | 85 | ```swift 86 | if #available(iOS 10.0, *) { 87 | let url = NSURL(string:"App-prefs:root=General&path=Keyboard")! as URL 88 | UIApplication.shared.open(url) 89 | } 90 | ``` 91 | 92 | 93 | ## Objective-c 94 | 95 | ```objective-c 96 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=General&path=Keyboard"]]; 97 | ``` 98 | 99 | ## Open App's settings extension 100 | 101 | ```swift 102 | extension UIApplication { 103 | 104 | func openAppSettings() { 105 | if let url = URL(string:UIApplicationOpenSettingsURLString) { 106 | openExpectedURL(url) 107 | } 108 | } 109 | 110 | fileprivate func openExpectedURL(_ url: URL) { 111 | if UIApplication.shared.canOpenURL(url) { 112 | if #available(iOS 10.0, *) { 113 | UIApplication.shared.open(url, options: [:], completionHandler: nil) 114 | }else{ 115 | UIApplication.shared.openURL(url) 116 | } 117 | } 118 | } 119 | 120 | } 121 | ``` 122 | 123 | More info: 124 | 125 | ### URL Schemes 126 | 127 | | Description | Command Swift < 3 OR Objc | Swift 3 | 128 | | --- | --- | --- | 129 | | Settings Section **topmost level** | From Widget (`Prefs:`) | From App (`App-prefs:`) | 130 | | About | `prefs:root=General&path=About` | `App-prefs:root=General&path=About` | 131 | | Accessibility | `prefs:root=General&path=ACCESSIBILITY` | `App-prefs:root=General&path=ACCESSIBILITY` | 132 | | Account Settings | `prefs:root=ACCOUNT_SETTINGS` |`App-prefs:root=ACCOUNT_SETTINGS` | 133 | | Airplane Mode | `prefs:root=AIRPLANE_MODE` | `App-prefs:root=AIRPLANE_MODE` | 134 | | Autolock iOS < 10 | `prefs:root=General&path=AUTOLOCK` | `App-prefs:root=General&path=AUTOLOCK` | 135 | | Auto-Lock iOS > 10 | `prefs:root=DISPLAY&path=AUTOLOCK` | `App-prefs:root=DISPLAY&path=AUTOLOCK` | 136 | | Apple Pay / Wallet | `shoebox://url-scheme` | `shoebox://url-scheme` | 137 | | Battery | `prefs:root=BATTERY_USAGE` | `App-prefs:root=BATTERY_USAGE` | 138 | | Brightness | `prefs:root=Brightness` | `App-prefs:root=Brightness` | 139 | | Bluetooth iOS < 9 | `prefs:root=General&path=Bluetooth` | `App-prefs:root=General&path=Bluetooth`| 140 | | Bluetooth iOS > 9 | `prefs:root=Bluetooth` | `App-prefs:root=Bluetooth` | 141 | | Castle | `prefs:root=CASTLE` | `App-prefs:root=CASTLE` | 142 | | Cellular Usage | `prefs:root=General&path=USAGE/CELLULAR_USAGE` | `App-prefs:root=General&path=USAGE/CELLULAR_USAGE` | 143 | | Configuration List | `prefs:root=General&path=ManagedConfigurationList` | `App-prefs:root=General&path=ManagedConfigurationList`| 144 | | Date and Time | `prefs:root=General&path=DATE_AND_TIME` | `App-prefs:root=General&path=DATE_AND_TIME`| 145 | | Do not disturb | `prefs:root=General&path=DO_NOT_DISTURB` | `App-prefs:root=General&path=DO_NOT_DISTURB` | 146 | | Facetime | `prefs:root=FACETIME` | `App-prefs:root=FACETIME` | 147 | | General | `prefs:root=General` | `App-prefs:root=General` | 148 | | Internet Tethering | `prefs:root=INTERNET_TETHERING` | `App-prefs:root=INTERNET_TETHERING` | 149 | | iTunes| `prefs:root=MUSIC` | `App-prefs:root=MUSIC` | 150 | | iTunes Equalizer | `prefs:root=MUSIC&path=EQ` | `App-prefs:root=MUSIC&path=EQ` | 151 | | iTunes Volume | `prefs:root=MUSIC&path=VolumeLimit` | `App-prefs:root=MUSIC&path=VolumeLimit` | 152 | | Keyboard | `prefs:root=General&path=Keyboard` | `App-prefs:root=General&path=Keyboard` | 153 | | Deeper in Keyboard | `prefs:root=General&path=Keyboard/KEYBOARDS` | `App-prefs:root=General&path=Keyboard/KEYBOARDS` | 154 | | Lang International | `prefs:root=General&path=INTERNATIONAL` | `App-prefs:root=General&path=INTERNATIONAL` | 155 | | Location Services | `prefs:root=Privacy&path=LOCATION` | `App-Prefs:root=Privacy&path=LOCATION` | 156 | | Mobile Data | | `prefs:root=MOBILE_DATA_SETTINGS_ID` | 157 | | Network | `prefs:root=General&path=Network` | `App-prefs:root=General&path=Network` | 158 | | Nike iPod | `prefs:root=NIKE_PLUS_IPOD` | `App-prefs:root=NIKE_PLUS_IPOD`| 159 | | Notes | `prefs:root=NOTES` |`App-prefs:root=NOTES` | 160 | | Notifications ID | `prefs:root=NOTIFICATIONS_ID` | `App-prefs:root=NOTIFICATIONS_ID` | 161 | | Passcode / Touch ID | `prefs:root=TOUCHID_PASSCODE`| `App-prefs:root=TOUCHID_PASSCODE` | 162 | | Passbook | `prefs:root=PASSBOOK` | `App-prefs:root=PASSBOOK` | 163 | | Phone | `prefs:root=Phone` | `App-prefs:root=Phone` | 164 | | Photo Camera Roll | `prefs:root=Photos` | `App-prefs:root=Photos` | 165 | | Privacy | `Prefs:root=Privacy` | `App-prefs:root=Privacy` | 166 | | Profiles & Device Management | `Prefs:root=General&path=ManagedConfigurationList` | `App-prefs:root=General&path=ManagedConfigurationList` | 167 | | Reset | `prefs:root=General&path=Reset` | `App-prefs:root=General&path=Reset` | 168 | | Ringtone | `prefs:root=Sounds&path=Ringtone` | `App-prefs:root=Sounds&path=Ringtone` | 169 | | Siri | `prefs:root=SIRI` | `App-prefs:root=SIRI` | 170 | | Safari | `prefs:root=Safari` | `App-prefs:root=Safari` | 171 | | Siri iOS < 10? | `prefs:root=General&path=Assistant` | `App-prefs:root=General&path=Assistant` | 172 | | Siri iOS > 10? | `prefs:root=SIRI` | `App-prefs:root=SIRI` | 173 | | Sounds | `prefs:root=Sounds` | `App-prefs:root=Sounds` | 174 | | Software Update | `prefs:root=General&path=SOFTWARE_UPDATE_LINK` | `App-prefs:root=General&path=SOFTWARE_UPDATE_LINK` | 175 | | Storage & Backup | `prefs:root=CASTLE&path=STORAGE_AND_BACKUP` | `App-prefs:root=CASTLE&path=STORAGE_AND_BACKUP` | 176 | | Store | `prefs:root=STORE` | `App-pref:root=STORE` | 177 | | Twitter | `prefs:root=TWITTER` | `App-prefs:root=TWITTER` | 178 | | Usage | `prefs:root=General&path=USAGE` | `App-prefs:root=General&path=USAGE` | 179 | | Video | `prefs:root=VIDEO` | `App-prefs:root=VIDEO` | 180 | | VPN| `prefs:root=General&path=Network/VPN` | `App-prefs:root=General&path=Network/VPN` | 181 | | Wallpaper | `prefs:root=Wallpaper` | `App-prefs:root=Wallpaper` | 182 | | WIFI | `prefs:root=WIFI` | `App-prefs:root=WIFI` | 183 | 184 | 185 | ### Open other App's Notification settings 186 | 187 | You can open any app notification's settings, only if that app **HAS** notifications enabled. For that you need the **bundleID** added in path: 188 | 189 | ```swift 190 | UIApplication.shared.openURL(NSURL(string:"App-prefs:root=NOTIFICATIONS_ID&path=com.microsoft.Office.Word")! as URL) 191 | ``` 192 | 193 | Finding an app's bundle identifier of any app: 194 | 195 | > * 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 196 | > * Copy the app ID number. It’s just the numbers after the text “id” and before the “?”. So in this case, it is: 284910350. 197 | > * Paste that ID number into this URL: https://itunes.apple.com/lookup?id=284910350 198 | > * This will download a file **1.txt** 199 | > * Search the output you get back for “**bundleId**”. The app’s bundle ID will be listed there: com.yelp.yelpiphone 200 | 201 | source: https://kb.acronis.com/content/39368 202 | 203 | ### Bluetooth 204 | As [@johnny77221](https://gist.github.com/johnny77221) mention in comments, he impleted a way to open bluetooth settings, read in link above: 205 | 206 | https://gist.github.com/johnny77221/bcaa5384a242b64bfd0b8a715f48e69f 207 | 208 | ### Apple Pay / Wallet 209 | by [@luismadrigal](https://gist.github.com/luismadrigal) 210 | 211 | shoebox:// 212 | 213 | ### Cordova Plugin 214 | [@guyromb](https://gist.github.com/guyromb) made a cordova plugin 215 | 216 | https://github.com/guyromb/Cordova-open-native-settings/blob/master/src/ios/NativeSettings.m 217 | 218 | ### A cocopods plugin 219 | it seems [@yoiang](https://gist.github.com/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 ;) 220 | 221 | https://github.com/Adorkable/SettingsAppAccessiOS 222 | 223 | ## Open App Store 224 | 225 | 226 | ```swift 227 | UIApplication.shared.openURL(URL(string: "itms-apps://itunes.apple.com/app/id" + appStoreAppID)!) 228 | ``` 229 | 230 | 231 | ## Contributions: 232 | 233 | [@antonjn](https://gist.github.com/antonjn), [@mikengyn](https://gist.github.com/mikengyn), [@johnny77221](https://gist.github.com/johnny77221), [@luismadrigal](https://gist.github.com/luismadrigal), [@guyromb](https://gist.github.com/guyromb), [@yoiang](https://gist.github.com/yoiang), [@deanlyoung](https://gist.github.com/deanlyoung), [@axlmagnum](https://github.com/axlmagnum) 234 | 235 | 236 | -------------------------------------------------------------------------------- /URLSchemes/URLSchemes.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 6F88A041211E00840019717F /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 6F88A040211E00840019717F /* Settings.bundle */; }; 11 | BCBA91CD1CEAFF2E00A13E00 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCBA91CC1CEAFF2E00A13E00 /* AppDelegate.swift */; }; 12 | BCBA91CF1CEAFF2E00A13E00 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCBA91CE1CEAFF2E00A13E00 /* ViewController.swift */; }; 13 | BCBA91D21CEAFF2E00A13E00 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BCBA91D01CEAFF2E00A13E00 /* Main.storyboard */; }; 14 | BCBA91D41CEAFF2E00A13E00 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BCBA91D31CEAFF2E00A13E00 /* Assets.xcassets */; }; 15 | BCBA91D71CEAFF2E00A13E00 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BCBA91D51CEAFF2E00A13E00 /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | 6F88A040211E00840019717F /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = ""; }; 20 | BCBA91C91CEAFF2D00A13E00 /* URLSchemes.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = URLSchemes.app; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | BCBA91CC1CEAFF2E00A13E00 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 22 | BCBA91CE1CEAFF2E00A13E00 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 23 | BCBA91D11CEAFF2E00A13E00 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 24 | BCBA91D31CEAFF2E00A13E00 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 25 | BCBA91D61CEAFF2E00A13E00 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 26 | BCBA91D81CEAFF2E00A13E00 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 27 | /* End PBXFileReference section */ 28 | 29 | /* Begin PBXFrameworksBuildPhase section */ 30 | BCBA91C61CEAFF2D00A13E00 /* Frameworks */ = { 31 | isa = PBXFrameworksBuildPhase; 32 | buildActionMask = 2147483647; 33 | files = ( 34 | ); 35 | runOnlyForDeploymentPostprocessing = 0; 36 | }; 37 | /* End PBXFrameworksBuildPhase section */ 38 | 39 | /* Begin PBXGroup section */ 40 | BC5FF7081D212621002E0E46 /* Resources */ = { 41 | isa = PBXGroup; 42 | children = ( 43 | ); 44 | path = Resources; 45 | sourceTree = ""; 46 | }; 47 | BCBA91C01CEAFF2D00A13E00 = { 48 | isa = PBXGroup; 49 | children = ( 50 | BCBA91CB1CEAFF2E00A13E00 /* URLSchemes */, 51 | BCBA91CA1CEAFF2D00A13E00 /* Products */, 52 | ); 53 | sourceTree = ""; 54 | }; 55 | BCBA91CA1CEAFF2D00A13E00 /* Products */ = { 56 | isa = PBXGroup; 57 | children = ( 58 | BCBA91C91CEAFF2D00A13E00 /* URLSchemes.app */, 59 | ); 60 | name = Products; 61 | sourceTree = ""; 62 | }; 63 | BCBA91CB1CEAFF2E00A13E00 /* URLSchemes */ = { 64 | isa = PBXGroup; 65 | children = ( 66 | BC5FF7081D212621002E0E46 /* Resources */, 67 | BCBA91CC1CEAFF2E00A13E00 /* AppDelegate.swift */, 68 | BCBA91CE1CEAFF2E00A13E00 /* ViewController.swift */, 69 | BCBA91D01CEAFF2E00A13E00 /* Main.storyboard */, 70 | BCBA91D31CEAFF2E00A13E00 /* Assets.xcassets */, 71 | BCBA91D51CEAFF2E00A13E00 /* LaunchScreen.storyboard */, 72 | BCBA91D81CEAFF2E00A13E00 /* Info.plist */, 73 | 6F88A040211E00840019717F /* Settings.bundle */, 74 | ); 75 | path = URLSchemes; 76 | sourceTree = ""; 77 | }; 78 | /* End PBXGroup section */ 79 | 80 | /* Begin PBXNativeTarget section */ 81 | BCBA91C81CEAFF2D00A13E00 /* URLSchemes */ = { 82 | isa = PBXNativeTarget; 83 | buildConfigurationList = BCBA91DB1CEAFF2E00A13E00 /* Build configuration list for PBXNativeTarget "URLSchemes" */; 84 | buildPhases = ( 85 | BCBA91C51CEAFF2D00A13E00 /* Sources */, 86 | BCBA91C61CEAFF2D00A13E00 /* Frameworks */, 87 | BCBA91C71CEAFF2D00A13E00 /* Resources */, 88 | ); 89 | buildRules = ( 90 | ); 91 | dependencies = ( 92 | ); 93 | name = URLSchemes; 94 | productName = URLSchemes; 95 | productReference = BCBA91C91CEAFF2D00A13E00 /* URLSchemes.app */; 96 | productType = "com.apple.product-type.application"; 97 | }; 98 | /* End PBXNativeTarget section */ 99 | 100 | /* Begin PBXProject section */ 101 | BCBA91C11CEAFF2D00A13E00 /* Project object */ = { 102 | isa = PBXProject; 103 | attributes = { 104 | LastSwiftUpdateCheck = 0730; 105 | LastUpgradeCheck = 0830; 106 | ORGANIZATIONNAME = "Sofía Swidarowicz Andrade"; 107 | TargetAttributes = { 108 | BCBA91C81CEAFF2D00A13E00 = { 109 | CreatedOnToolsVersion = 7.3; 110 | DevelopmentTeam = VHZLJMKCP6; 111 | LastSwiftMigration = 0820; 112 | SystemCapabilities = { 113 | com.apple.Push = { 114 | enabled = 0; 115 | }; 116 | com.apple.SafariKeychain = { 117 | enabled = 1; 118 | }; 119 | }; 120 | }; 121 | }; 122 | }; 123 | buildConfigurationList = BCBA91C41CEAFF2D00A13E00 /* Build configuration list for PBXProject "URLSchemes" */; 124 | compatibilityVersion = "Xcode 3.2"; 125 | developmentRegion = English; 126 | hasScannedForEncodings = 0; 127 | knownRegions = ( 128 | en, 129 | Base, 130 | de, 131 | es, 132 | fr, 133 | it, 134 | nl, 135 | "pt-PT", 136 | ); 137 | mainGroup = BCBA91C01CEAFF2D00A13E00; 138 | productRefGroup = BCBA91CA1CEAFF2D00A13E00 /* Products */; 139 | projectDirPath = ""; 140 | projectRoot = ""; 141 | targets = ( 142 | BCBA91C81CEAFF2D00A13E00 /* URLSchemes */, 143 | ); 144 | }; 145 | /* End PBXProject section */ 146 | 147 | /* Begin PBXResourcesBuildPhase section */ 148 | BCBA91C71CEAFF2D00A13E00 /* Resources */ = { 149 | isa = PBXResourcesBuildPhase; 150 | buildActionMask = 2147483647; 151 | files = ( 152 | BCBA91D71CEAFF2E00A13E00 /* LaunchScreen.storyboard in Resources */, 153 | 6F88A041211E00840019717F /* Settings.bundle in Resources */, 154 | BCBA91D41CEAFF2E00A13E00 /* Assets.xcassets in Resources */, 155 | BCBA91D21CEAFF2E00A13E00 /* Main.storyboard in Resources */, 156 | ); 157 | runOnlyForDeploymentPostprocessing = 0; 158 | }; 159 | /* End PBXResourcesBuildPhase section */ 160 | 161 | /* Begin PBXSourcesBuildPhase section */ 162 | BCBA91C51CEAFF2D00A13E00 /* Sources */ = { 163 | isa = PBXSourcesBuildPhase; 164 | buildActionMask = 2147483647; 165 | files = ( 166 | BCBA91CF1CEAFF2E00A13E00 /* ViewController.swift in Sources */, 167 | BCBA91CD1CEAFF2E00A13E00 /* AppDelegate.swift in Sources */, 168 | ); 169 | runOnlyForDeploymentPostprocessing = 0; 170 | }; 171 | /* End PBXSourcesBuildPhase section */ 172 | 173 | /* Begin PBXVariantGroup section */ 174 | BCBA91D01CEAFF2E00A13E00 /* Main.storyboard */ = { 175 | isa = PBXVariantGroup; 176 | children = ( 177 | BCBA91D11CEAFF2E00A13E00 /* Base */, 178 | ); 179 | name = Main.storyboard; 180 | sourceTree = ""; 181 | }; 182 | BCBA91D51CEAFF2E00A13E00 /* LaunchScreen.storyboard */ = { 183 | isa = PBXVariantGroup; 184 | children = ( 185 | BCBA91D61CEAFF2E00A13E00 /* Base */, 186 | ); 187 | name = LaunchScreen.storyboard; 188 | sourceTree = ""; 189 | }; 190 | /* End PBXVariantGroup section */ 191 | 192 | /* Begin XCBuildConfiguration section */ 193 | BCBA91D91CEAFF2E00A13E00 /* Debug */ = { 194 | isa = XCBuildConfiguration; 195 | buildSettings = { 196 | ALWAYS_SEARCH_USER_PATHS = NO; 197 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 198 | CLANG_ANALYZER_NONNULL = YES; 199 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 200 | CLANG_CXX_LIBRARY = "libc++"; 201 | CLANG_ENABLE_MODULES = YES; 202 | CLANG_ENABLE_OBJC_ARC = YES; 203 | CLANG_WARN_BOOL_CONVERSION = YES; 204 | CLANG_WARN_CONSTANT_CONVERSION = YES; 205 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 206 | CLANG_WARN_EMPTY_BODY = YES; 207 | CLANG_WARN_ENUM_CONVERSION = YES; 208 | CLANG_WARN_INFINITE_RECURSION = YES; 209 | CLANG_WARN_INT_CONVERSION = YES; 210 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 211 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 212 | CLANG_WARN_UNREACHABLE_CODE = YES; 213 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 214 | CODE_SIGN_IDENTITY = "iPhone Developer: Sofia E Swidarowicz Andrade (JB2LXE6G7V)"; 215 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Sofia E Swidarowicz Andrade (JB2LXE6G7V)"; 216 | COPY_PHASE_STRIP = NO; 217 | DEBUG_INFORMATION_FORMAT = dwarf; 218 | ENABLE_STRICT_OBJC_MSGSEND = YES; 219 | ENABLE_TESTABILITY = YES; 220 | GCC_C_LANGUAGE_STANDARD = gnu99; 221 | GCC_DYNAMIC_NO_PIC = NO; 222 | GCC_NO_COMMON_BLOCKS = YES; 223 | GCC_OPTIMIZATION_LEVEL = 0; 224 | GCC_PREPROCESSOR_DEFINITIONS = ( 225 | "DEBUG=1", 226 | "$(inherited)", 227 | ); 228 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 229 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 230 | GCC_WARN_UNDECLARED_SELECTOR = YES; 231 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 232 | GCC_WARN_UNUSED_FUNCTION = YES; 233 | GCC_WARN_UNUSED_VARIABLE = YES; 234 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 235 | MTL_ENABLE_DEBUG_INFO = YES; 236 | ONLY_ACTIVE_ARCH = YES; 237 | PROVISIONING_PROFILE = "a26b90bd-adbe-4012-bcc6-dc125d0090b7"; 238 | SDKROOT = iphoneos; 239 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 240 | }; 241 | name = Debug; 242 | }; 243 | BCBA91DA1CEAFF2E00A13E00 /* Release */ = { 244 | isa = XCBuildConfiguration; 245 | buildSettings = { 246 | ALWAYS_SEARCH_USER_PATHS = NO; 247 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 248 | CLANG_ANALYZER_NONNULL = YES; 249 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 250 | CLANG_CXX_LIBRARY = "libc++"; 251 | CLANG_ENABLE_MODULES = YES; 252 | CLANG_ENABLE_OBJC_ARC = YES; 253 | CLANG_WARN_BOOL_CONVERSION = YES; 254 | CLANG_WARN_CONSTANT_CONVERSION = YES; 255 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 256 | CLANG_WARN_EMPTY_BODY = YES; 257 | CLANG_WARN_ENUM_CONVERSION = YES; 258 | CLANG_WARN_INFINITE_RECURSION = YES; 259 | CLANG_WARN_INT_CONVERSION = YES; 260 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 261 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 262 | CLANG_WARN_UNREACHABLE_CODE = YES; 263 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 264 | CODE_SIGN_IDENTITY = "iPhone Distribution: Idealista, S.A. (VHZLJMKCP6)"; 265 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Idealista, S.A. (VHZLJMKCP6)"; 266 | COPY_PHASE_STRIP = NO; 267 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 268 | ENABLE_NS_ASSERTIONS = NO; 269 | ENABLE_STRICT_OBJC_MSGSEND = YES; 270 | GCC_C_LANGUAGE_STANDARD = gnu99; 271 | GCC_NO_COMMON_BLOCKS = YES; 272 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 273 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 274 | GCC_WARN_UNDECLARED_SELECTOR = YES; 275 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 276 | GCC_WARN_UNUSED_FUNCTION = YES; 277 | GCC_WARN_UNUSED_VARIABLE = YES; 278 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 279 | MTL_ENABLE_DEBUG_INFO = NO; 280 | PROVISIONING_PROFILE = "1bc625e4-5fb6-4ffd-aca1-c5e7fc7b2e62"; 281 | SDKROOT = iphoneos; 282 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 283 | VALIDATE_PRODUCT = YES; 284 | }; 285 | name = Release; 286 | }; 287 | BCBA91DC1CEAFF2E00A13E00 /* Debug */ = { 288 | isa = XCBuildConfiguration; 289 | buildSettings = { 290 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 291 | CODE_SIGN_IDENTITY = "iPhone Developer"; 292 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 293 | DEVELOPMENT_TEAM = VHZLJMKCP6; 294 | INFOPLIST_FILE = URLSchemes/Info.plist; 295 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 296 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 297 | PRODUCT_BUNDLE_IDENTIFIER = com.phynet.es; 298 | PRODUCT_NAME = "$(TARGET_NAME)"; 299 | PROVISIONING_PROFILE = ""; 300 | PROVISIONING_PROFILE_SPECIFIER = ""; 301 | SWIFT_VERSION = 3.0; 302 | }; 303 | name = Debug; 304 | }; 305 | BCBA91DD1CEAFF2E00A13E00 /* Release */ = { 306 | isa = XCBuildConfiguration; 307 | buildSettings = { 308 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 309 | CODE_SIGN_IDENTITY = ""; 310 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 311 | INFOPLIST_FILE = URLSchemes/Info.plist; 312 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 313 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 314 | PRODUCT_BUNDLE_IDENTIFIER = com.phynet.es; 315 | PRODUCT_NAME = "$(TARGET_NAME)"; 316 | PROVISIONING_PROFILE = ""; 317 | SWIFT_VERSION = 3.0; 318 | }; 319 | name = Release; 320 | }; 321 | /* End XCBuildConfiguration section */ 322 | 323 | /* Begin XCConfigurationList section */ 324 | BCBA91C41CEAFF2D00A13E00 /* Build configuration list for PBXProject "URLSchemes" */ = { 325 | isa = XCConfigurationList; 326 | buildConfigurations = ( 327 | BCBA91D91CEAFF2E00A13E00 /* Debug */, 328 | BCBA91DA1CEAFF2E00A13E00 /* Release */, 329 | ); 330 | defaultConfigurationIsVisible = 0; 331 | defaultConfigurationName = Release; 332 | }; 333 | BCBA91DB1CEAFF2E00A13E00 /* Build configuration list for PBXNativeTarget "URLSchemes" */ = { 334 | isa = XCConfigurationList; 335 | buildConfigurations = ( 336 | BCBA91DC1CEAFF2E00A13E00 /* Debug */, 337 | BCBA91DD1CEAFF2E00A13E00 /* Release */, 338 | ); 339 | defaultConfigurationIsVisible = 0; 340 | defaultConfigurationName = Release; 341 | }; 342 | /* End XCConfigurationList section */ 343 | }; 344 | rootObject = BCBA91C11CEAFF2D00A13E00 /* Project object */; 345 | } 346 | -------------------------------------------------------------------------------- /URLSchemes/URLSchemes.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /URLSchemes/URLSchemes.xcodeproj/project.xcworkspace/xcuserdata/s.swidar.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phynet/iOS-URL-Schemes/d011baf5c3fdaf5b2a13c16a9335d96e5b1f4436/URLSchemes/URLSchemes.xcodeproj/project.xcworkspace/xcuserdata/s.swidar.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /URLSchemes/URLSchemes.xcodeproj/xcuserdata/s.swidar.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /URLSchemes/URLSchemes.xcodeproj/xcuserdata/s.swidar.xcuserdatad/xcschemes/URLSchemes.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /URLSchemes/URLSchemes.xcodeproj/xcuserdata/s.swidar.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | URLSchemes.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | BCBA91C81CEAFF2D00A13E00 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /URLSchemes/URLSchemes/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // URLSchemes 4 | // 5 | // Created by Sofía Swidarowicz Andrade on 17/5/16. 6 | // Copyright © 2016 Sofía Swidarowicz Andrade. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 17 | settingAppVersion() 18 | return true 19 | } 20 | //This code adds bundle settings to the project 21 | func settingAppVersion() { 22 | let appVersionString = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String 23 | let defaults = UserDefaults.standard 24 | defaults.setValue(appVersionString, forKey: "appVersion") 25 | defaults.synchronize() 26 | } 27 | } 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /URLSchemes/URLSchemes/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /URLSchemes/URLSchemes/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /URLSchemes/URLSchemes/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /URLSchemes/URLSchemes/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | URLSchemes 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleURLTypes 24 | 25 | 26 | CFBundleTypeRole 27 | Editor 28 | CFBundleURLSchemes 29 | 30 | prefs 31 | 32 | 33 | 34 | CFBundleVersion 35 | 1 36 | LSRequiresIPhoneOS 37 | 38 | UILaunchStoryboardName 39 | LaunchScreen 40 | UIMainStoryboardFile 41 | Main 42 | UIRequiredDeviceCapabilities 43 | 44 | armv7 45 | 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /URLSchemes/URLSchemes/Settings.bundle/Root.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | DefaultValue 9 | 10 | Type 11 | PSTitleValueSpecifier 12 | Title 13 | Version: 14 | Key 15 | appVersion 16 | 17 | 18 | StringsTable 19 | Root 20 | 21 | 22 | -------------------------------------------------------------------------------- /URLSchemes/URLSchemes/Settings.bundle/en.lproj/Root.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phynet/iOS-URL-Schemes/d011baf5c3fdaf5b2a13c16a9335d96e5b1f4436/URLSchemes/URLSchemes/Settings.bundle/en.lproj/Root.strings -------------------------------------------------------------------------------- /URLSchemes/URLSchemes/URLSchemes.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /URLSchemes/URLSchemes/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // URLSchemes 4 | // 5 | // Created by Sofía Swidarowicz Andrade on 17/5/16. 6 | // Copyright © 2016 Sofía Swidarowicz Andrade. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | @IBOutlet weak var button: NSLayoutConstraint! 14 | override func viewDidLoad() { 15 | super.viewDidLoad() 16 | button.accessibilityLabel = "buttonTesting" 17 | } 18 | 19 | override func didReceiveMemoryWarning() { 20 | super.didReceiveMemoryWarning() 21 | // Dispose of any resources that can be recreated. 22 | } 23 | 24 | @IBAction func openSchemes(_ sender: AnyObject) { 25 | openSettingsApp() 26 | } 27 | 28 | func openSettingsiOS9andless(){ 29 | //This is how it works in iOS < 11 30 | UIApplication.shared.openURL(NSURL(string:"App-Prefs:root=General&path=Keyboard")! as URL) 31 | } 32 | 33 | func openSettingsApp(){ 34 | if #available(iOS 10.0, *) { 35 | let settingsUrl = NSURL(string:UIApplicationOpenSettingsURLString)! as URL 36 | UIApplication.shared.open(settingsUrl, options: [:], completionHandler: nil) 37 | } 38 | } 39 | 40 | func openSOSettings(){ 41 | if #available(iOS 10.0, *) { 42 | let url = NSURL(string:"App-prefs:root=General&path=Keyboard")! as URL 43 | UIApplication.shared.open(url) 44 | } 45 | } 46 | } 47 | extension UIApplication { 48 | func openAppSettings() { 49 | if let url = URL(string:UIApplicationOpenSettingsURLString) { 50 | openExpectedURL(url) 51 | } 52 | } 53 | 54 | fileprivate func openExpectedURL(_ url: URL) { 55 | if UIApplication.shared.canOpenURL(url) { 56 | if #available(iOS 10.0, *) { 57 | UIApplication.shared.open(url, options: [:], completionHandler: nil) 58 | }else{ 59 | UIApplication.shared.openURL(url) 60 | } 61 | } 62 | } 63 | } 64 | 65 | --------------------------------------------------------------------------------