core data - Swift NSManagedObjects do not support mutableSetValueForKey -
i practicing tute task on swift coredata. reminder app, have these entities in core data file:
and error in viewdidload() function:
var reminderlist: nsmutablearray //in viewdidload() { super.viewdidload() //fetchrequest code blocks self.reminderlist = nsmutablearray(array: (currentreminders?.members?.allobjects) as! [reminder])
i got error message: 'nsmanagedobjects of entity 'reminderlist' not support -mutablesetvalueforkey: property 'members''
, app crashed.
this problem because of mistake in setting relationship between entities in coredata. check see if constraints set to-one/many.
Comments
Post a Comment