We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This code works the first time though when I run it a second time on the line:
let moc = CoreDataStack.defaultStack.managedObjectContext
let task: Task = NSEntityDescription.insertNewObjectForEntityForName("Task", inManagedObjectContext: moc) as! Task task.name = "HElaLuia" let cycling: Task = NSEntityDescription.insertNewObjectForEntityForName("Task", inManagedObjectContext: moc) as! Task cycling.name = "Foolish" let biking: Task = NSEntityDescription.insertNewObjectForEntityForName("Task", inManagedObjectContext: moc) as! Task biking.name = "Acting" let outdoorTasksTag = NSEntityDescription.insertNewObjectForEntityForName("Tag", inManagedObjectContext: moc) as! Tag outdoorTasksTag.name = "AnotherTag" let newTasksTag = NSEntityDescription.insertNewObjectForEntityForName("Tag", inManagedObjectContext: moc) as! Tag newTasksTag.name = "Just Another Tag" newTasksTag.task = biking outdoorTasksTag.task = cycling if moc.hasChanges { do { try moc.save() } catch let error as NSError? { print("Error Occured \(error!)", terminator: "\n") } } CoreDataStack.defaultStack.seamStore!.triggerSync() do { try moc.save() } catch { print("Error thrown baby", terminator: "\n") } let fetchRequest: NSFetchRequest = NSFetchRequest(entityName: "Task") do { let results = try moc.executeFetchRequest(fetchRequest) for result in results as! [Task] { result.name = "\(result.name! ) ClientChange" NSLog ("result.name %@ \n",result); } try moc.save() } catch { }
Also can you give a demo of how to use the cloudKit functionality. Thank you in Advance. :)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This code works the first time though when I run it a second time on the line:
(unexpectedly found nil while unwrapping an Optional value)
let moc = CoreDataStack.defaultStack.managedObjectContext
Also can you give a demo of how to use the cloudKit functionality.
Thank you in Advance. :)
The text was updated successfully, but these errors were encountered: