One or more models in this application are using transformable properties with transformer names that are either unset, or set to NSKeyedUnarchiveFromDataTransformerName.

I am getting an error:


One or more models in this application are using transformable properties with transformer names that are either unset, or set to NSKeyedUnarchiveFromDataTransformerName.


I haven't even saved any data to Core Data yet.


The property that has type Transformable, 'notificationIdentifiers', is of type NSObject in my NSManagedObject subclass. Why is the error saying it is unset or set to NSKeyedUnarchiveFromDataTransformerName?


I also get the warning:


CoreData: warning: Property 'notificationIdentifiers' on Entity 'Affirmation' is using nil or an insecure NSValueTransformer. Please switch to using "NSSecureUnarchiveFromData" or a subclass of NSSecureUnarchiveFromDataTransformer instead.


Here is my NSManagedObject subclass:

extension Affirmation {

    @nonobjc public class func fetchRequest() -> NSFetchRequest<Affirmation> {
        return NSFetchRequest<Affirmation>(entityName: "Affirmation")
    }

    @NSManaged public var body: String
    @NSManaged public var count: Int64
    @NSManaged public var days: NSData
    @NSManaged public var frequency: Int64
    @NSManaged public var notificationIdentifiers: NSObject
    @NSManaged public var recordName: String?
    @NSManaged public var time: NSDate
    @NSManaged public var timestamp: NSDate
    @NSManaged public var title: String

}


When I change that property to be of type NSSecureUnarchiveFromData in my NSManagedObject subclass, I get an error saying:


Use of undeclared type 'NSSecureUnarchiveFromData'


I did a search on Google and I get no results telling me which library framework Use of undeclared type 'NSSecureUnarchiveFromData' belongs to.


I don't think I am understanding exactly what this message is saying.


Here is my entire debug window:



2020-04-09 14:43:34.107774-0500 Affirmations[3922:921109] [error] fault: One or more models in this application are using transformable properties with transformer names that are either unset, or set to NSKeyedUnarchiveFromDataTransformerName. Please switch to using "NSSecureUnarchiveFromData" or a subclass of NSSecureUnarchiveFromDataTransformer instead. At some point, Core Data will default to using "NSSecureUnarchiveFromData" when nil is specified, and transformable properties containing classes that do not support NSSecureCoding will become unreadable.

CoreData: fault: One or more models in this application are using transformable properties with transformer names that are either unset, or set to NSKeyedUnarchiveFromDataTransformerName. Please switch to using "NSSecureUnarchiveFromData" or a subclass of NSSecureUnarchiveFromDataTransformer instead. At some point, Core Data will default to using "NSSecureUnarchiveFromData" when nil is specified, and transformable properties containing classes that do not support NSSecureCoding will become unreadable.

2020-04-09 14:43:34.108286-0500 Affirmations[3922:921109] [error] CoreData: One or more models in this application are using transformable properties with transformer names that are either unset, or set to NSKeyedUnarchiveFromDataTransformerName. Please switch to using "NSSecureUnarchiveFromData" or a subclass of NSSecureUnarchiveFromDataTransformer instead. At some point, Core Data will default to using "NSSecureUnarchiveFromData" when nil is specified, and transformable properties containing classes that do not support NSSecureCoding will become unreadable.

CoreData: warning: Property 'notificationIdentifiers' on Entity 'Affirmation' is using nil or an insecure NSValueTransformer. Please switch to using "NSSecureUnarchiveFromData" or a subclass of NSSecureUnarchiveFromDataTransformer instead.

I think that the error is telling you which entity and property is causing the error:


CoreData: warning: Property 'notificationIdentifiers' on Entity 'Affirmation' is using nil or an insecure NSValueTransformer. Please switch to using "NSSecureUnarchiveFromData" or a subclass of NSSecureUnarchiveFromDataTransformer instead

Yes. I got that. I noted in my post that property is of type NSObject in my managed object class. I don't know what to set it to instead of NSObject.

One or more models in this application are using transformable properties with transformer names that are either unset, or set to NSKeyedUnarchiveFromDataTransformerName.
 
 
Q