I declared two attributes (currentTime and fullTime) as Transformable in data model as shown below.
How to save data in this attribute? Do I need to convert to NSData first? or any other way?
I declared two attributes (currentTime and fullTime) as Transformable in data model as shown below.
How to save data in this attribute? Do I need to convert to NSData first? or any other way?
Copyright © 2021 Jogjafile Inc.

Transformable need to be convertible to
NSData. When you're using a type that conforms to theNSCodingprotocol, that happens automatically. When you're not (as withCMTime), you can't use a transformable unless you create your own custom transformer by subclassingNSValueTransformer.You may find it easier to simply save the
CMTimeproperties in Core Data and reconstruct theCMTimefrom those. The properties are all numeric types that Core Data knows how to handle.