Swift dynamicCast error while inserting new object to database
问题 I have a dictionary which I have all data that I want to insert into database as new object. The problem is when I try to cast the newly created object it gives me exception in: libswift_stdlib_core.dylib`swift_dynamicCast: part of assembly code. The code that i am using is like this: var group:Group if (array.count == 0) { group = NSEntityDescription.insertNewObjectForEntityForName("Group", inManagedObjectContext:appDelegate.managedObjectContext) as Group } and the structure of Group class