Created
July 28, 2017 19:41
-
-
Save iAmrSalman/65fe9aa66312540f97d5c10f063858d5 to your computer and use it in GitHub Desktop.
[Open App Settings] #swift3 #settings #errorhandling
This file contains 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
guard let settingsUrl = URL(string: UIApplicationOpenSettingsURLString) else { return } | |
if UIApplication.shared.canOpenURL(settingsUrl) { | |
UIApplication.shared.open(settingsUrl, completionHandler: { (success) in | |
print("Settings opened: \(success)") // Prints true | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment