I do have a simple Integer Array that I want to save/load to CoreData.
Do you have example of the best way to do both of the methods ?
Thank you!
Create an attribute with type binaryData in your entity. And convert your array to data using
NSKeyedArchiver.archivedDataWithRootObject(AnyObject)
And convert the array from data using
NSKeyedUnarchiver.unarchiveObjectWithData(NSData)
By this way you can store any object in core data.
Transformablewith[Int]asCustom Class(assuming you set code generation to Swift for the model) will work. CoreData will archive/dearchive data behind offscreen.