Skip to content

Instantly share code, notes, and snippets.

@iAmrSalman
Created July 28, 2017 19:41
Show Gist options
  • Save iAmrSalman/65fe9aa66312540f97d5c10f063858d5 to your computer and use it in GitHub Desktop.
Save iAmrSalman/65fe9aa66312540f97d5c10f063858d5 to your computer and use it in GitHub Desktop.
[Open App Settings] #swift3 #settings #errorhandling
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