Skip to content

Instantly share code, notes, and snippets.

View jetstreamaviator's full-sized avatar

jetstreamaviator

View GitHub Profile
# In AppDelegate:
# This is to make sure that it only happens on the first launch
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
let defaults = UserDefaults.standard
let isPreloaded = defaults.bool(forKey: "isPreloaded")
if !isPreloaded {