I am trying to load NSDT from my core data database but the data even remotely switched off I am comparing two files, what is showing, the original database is created, which is left of the NSData load, and any data saved from NSDT does not have any data, only table structure.
This is my source, and it is very basic:
NSManagedObjectContext * managedObjectContext = self.managedObjectContext; If (managedObjectContext! = Zero) {NSError * Error = zero; If ([managedObjectContext hasChanges] & amp;! [Managed object contact save: & amp; error]) // Change this code with code to correctly handle the error. // abort () applies to generate and end a crash log. You should not use this function in the shipping application, although it can be useful during development. NSLog (@ "Unsolver Error% @,% @", Error, [Error User Information]); Abortion (); }} NSString * path = [AppDelegate example] .databaseDirectory.path; NSData * file = [[NSFileManager defaultManager] ContentAct path: path]; [File writeToFile: [AppDelegate example] .tempDatabaseDirectory.path atomically: no];
No comments:
Post a Comment