Coredata -Migration stürzt abIOS

Programmierung für iOS
Anonymous
 Coredata -Migration stürzt ab

Post by Anonymous »

Ich habe eine iOS -App in Swift geschrieben. Die Live -Version ist 1.4.3 und es hat Version 2 von ".xcdatamodeld" als Standard. Standard. < /p>
In AppDelegate: < /p>
lazy var persistentContainer: NSPersistentContainer = {

let container = NSPersistentContainer(name: "MSN_App")

let fileName="MSN_App"+".sql"

if let url=FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).last?.appendingPathComponent(fileName){
let description = NSPersistentStoreDescription(url: url)
description.shouldMigrateStoreAutomatically = true
description.shouldInferMappingModelAutomatically = true
container.persistentStoreDescriptions=[description]
Log.b("COREDATA: Sqlite File ALREADY present.")
}else{
Log.b("COREDATA: Sqlite File NOT present yet.")
}
container.loadPersistentStores(completionHandler: { (storeDescription, error) in
if let error = error as NSError? {

fatalError("Unresolved error \(error), \(error.userInfo)")
}
})
return container
}()
< /code>
Stürzt, wenn Benutzer von 1.4.3 bis 1.5.0 aktualisiert. Msn_app_release /AppDelegate.Swift: 518: Fataler Fehler: ungelöster Fehler
Fehlerdomäne = NSCOCOARORRORDOMAIN CODE = 134110 "Ein Fehler ist während
persistent store migration."
UserInfo={sourceURL=file:///var/mobile/Containers/Data/Application/65182A1B-A541-485A-A5A7-BD79AFCCEB06/Library/Application%20Support/MSN_App.sql ,
Reason = kann den Laden nicht migrieren In-Place: E/A-Fehler für die Datenbank unter
/var/Mobile/Container/Daten/Anwendung/65182A1B-A541-485a-A5A7-BD79AFCCEB06/Bibliothek/Anwendung
Support/msn_app.sql. SQLite -Fehlercode: 1, 'Tabelle zekycinfo bereits
existiert',
destinationurl=File://var/mobile/containers/data/Application/65182a1b-a541-485a-a5a7-bd79afccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccsbr/application & support/msn_app Domain = NSCOCOARORRORDOMAIN
CODE = 134110 "Ein Fehler ist während der persistenten Speichermigration aufgetreten. /> NsFilepath =/var/mobile/container/data/application/65182a1b-a541-485a-a5a7-bd79afccccccccccccccccc/library/application
Support/msn_app.sql, nsunderingExcep

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post