Skip to content

Instantly share code, notes, and snippets.

@eldare
Last active June 3, 2019 19:49
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// init the instance to access our shared storage
let groupDefaults = UserDefaults(suiteName: "group.myAmazingApp")
// reading username from key
let username = groupDefaults?.string(forKey: "username")
return true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment