Created
April 28, 2022 17:09
-
-
Save andresr-dev/cfa298dba04f6f6afffd69963b544fca to your computer and use it in GitHub Desktop.
This is how you can open settings from your application.
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
| func openSettings() { | |
| guard let settingsUrl = URL(string: UIApplication.openSettingsURLString) else { | |
| return | |
| } | |
| if UIApplication.shared.canOpenURL(settingsUrl) { | |
| UIApplication.shared.open(settingsUrl) { success in | |
| print("Settings opened: \(success)") | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment