Skip to content

Instantly share code, notes, and snippets.

@MickaelCruzDB
Created January 9, 2020 09:04
Show Gist options
  • Save MickaelCruzDB/2bb879e9a832345d29a40988ce69ab24 to your computer and use it in GitHub Desktop.
Save MickaelCruzDB/2bb879e9a832345d29a40988ce69ab24 to your computer and use it in GitHub Desktop.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
let appDelegate = UIApplication.shared.delegate as! AppDelegate
let context = appDelegate.persistentContainer.viewContext
let request = NSFetchRequest<NSFetchRequestResult>(entityName: "AppVersion")
request.returnsObjectsAsFaults = false
do {
let result = try context.fetch(request)
for data in result as! [NSManagedObject] {
print("-----> \(data.value(forKey: "proLogged") as! String)")
}
} catch {
print("Failed")
}
return true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment