Reputation: 1383
i have a Message entity when i fetch the particular item based on objectID
i use this to access but it's showing error
let appDelegate = UIApplication.shared.delegate as! AppDelegate
appDelegate.managedObjectContext.objectWithID(objectID
Upvotes: 0
Views: 213
Reputation:
Try this
do {
let message = try managedObjectContext.objectWithID(objectID)
}catch let err{
print(err)
}
Upvotes: 1