Move files and Defaults to the shared container

This commit is contained in:
Yishi Lin 2017-06-11 02:09:45 +08:00
parent 8f91c4c516
commit 850dc75820
5 changed files with 82 additions and 24 deletions

View file

@ -113,7 +113,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
error conditions that could cause the creation of the store to fail.
*/
let container = NSPersistentContainer(name: "pass")
container.loadPersistentStores(completionHandler: { (storeDescription, error) in
let description = NSPersistentStoreDescription(url: Globals.sharedContainerURL)
container.loadPersistentStores(completionHandler: { (description, error) in
if let error = error as NSError? {
// Replace this implementation with code to handle the error appropriately.
// fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.