Skip to content

Instantly share code, notes, and snippets.

@erkekin
Created February 9, 2017 08:17
Show Gist options
  • Save erkekin/35a417cb476cfe750596884ef7349186 to your computer and use it in GitHub Desktop.
Save erkekin/35a417cb476cfe750596884ef7349186 to your computer and use it in GitHub Desktop.
func getURLSchema() -> String?{
guard let schemas = Bundle.main.object(forInfoDictionaryKey: "CFBundleURLTypes") as? [[String:Any]],
let schema = schemas.first,
let urlschema = schema["CFBundleURLName"] as? String
else {return nil}
return urlschema
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment