Created
December 29, 2018 13:50
-
-
Save troys-code/704b9229a46d6dc3380457171205ff8a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // so user can allow app to use location | |
| func openMyAppLocationSettings() { | |
| if let bundleId = Bundle.main.bundleIdentifier, | |
| let url = URL(string: "\(UIApplication.openSettingsURLString)&path=LOCATION/\(bundleId)") | |
| { | |
| UIApplication.shared.open(url, options: [:], completionHandler: nil) | |
| } | |
| } | |
| // so user can enable location services | |
| func openLocationSettings() { | |
| if let url = URL(string: "\(UIApplication.openSettingsURLString)&path=LOCATION") { | |
| UIApplication.shared.open(url, options: [:], completionHandler: nil) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment