Recibo este error CoreData. No tengo idea de por qué recibo este error. No estoy usando ningún tipo transformable. No veo nada en mi código que indique que estoy usando propiedades transformables. Dejé que Xcode configurara CoreData seleccionando la opción Usar datos principales cuando creé mi proyecto. Las otras preguntas similares no ayudan porque las respuestas tienen que ver con el código que se parece a cualquier cosa que pueda encontrar que Xcode creó cuando se creó el proyecto. El proyecto no se bloquea cuando aparece este error en la ventana de depuración. Estoy usando Xcode 11.3 y Google Maps SDK para iOS para iOS 12, y se ejecuta en un dispositivo iPhone 8 con iOS 13.3.
CoreData: annotation: Failed to load optimized model at path '/var/containers/Bundle/Application/A2B8A56C-E0D5-467A-9300-8EDFB20574BE/Routes.app/GoogleMaps.bundle/GMSCacheStorage.momd/StorageWithTileProto.omo'
2020-01-13 12:42:00.771883-0600 Routes[4631:1067373] [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-01-13 12:42:00.771972-0600 Routes[4631:1067373] [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 'value' on Entity 'GMSCacheProperty' is using nil or an insecure NSValueTransformer. Please switch to using "NSSecureUnarchiveFromData" or a subclass of NSSecureUnarchiveFromDataTransformer instead.
CoreData: annotation: Failed to load optimized model at path '/var/containers/Bundle/Application/A2B8A56C-E0D5-467A-9300-8EDFB20574BE/Routes.app/GoogleMaps.bundle/GMSCacheStorage.momd/StorageWithTileProto.omo'
CoreData: warning: Property 'value' on Entity 'GMSCacheProperty' is using nil or an insecure NSValueTransformer. Please switch to using "NSSecureUnarchiveFromData" or a subclass of NSSecureUnarchiveFromDataTransformer instead.
CoreData: annotation: Failed to load optimized model at path '/var/containers/Bundle/Application/A2B8A56C-E0D5-467A-9300-8EDFB20574BE/Routes.app/GoogleMaps.bundle/GMSCacheStorage.momd/StorageWithTileProto.omo'
CoreData: warning: Property 'value' on Entity 'GMSCacheProperty' is using nil or an insecure NSValueTransformer. Please switch to using "NSSecureUnarchiveFromData" or a subclass of NSSecureUnarchiveFromDataTransformer instead.
Este es el código que desencadena el error:
do {
storeAddresses = try managedObjectContext.fetch(Address.fetchRequest())
} catch {
print(error)
}
Estoy usando los siguientes objetos de datos principales:
Entidad de dirección
atributo de posición
tipo entero 16
tipo de atributo de texto Cadena
tipo de atributo de marca de tiempo Fecha
ruta relación destino Ruta direcciones inversas
Entidad de ruta
tipo de atributo de marca de tiempo Fecha
título atributo tipo Cadena
direcciones relación destino dirección ruta inversa
Tengo el siguiente código para las clases de objetos gestionados:
public class Address: NSManagedObject {
}
extension Address {
@nonobjc public class func fetchRequest() -> NSFetchRequest<Address> {
return NSFetchRequest<Address>(entityName: "Address")
}
@NSManaged public var text: String?
@NSManaged public var timestamp: NSDate
@NSManaged public var position: Int16
@NSManaged public var route: Route?
}
public class Route: NSManagedObject {
}
extension Route {
@nonobjc public class func fetchRequest() -> NSFetchRequest<Route> {
return NSFetchRequest<Route>(entityName: "Route")
}
@NSManaged public var timestamp: NSDate
@NSManaged public var title: String?
@NSManaged public var addresses: NSSet?
}
// MARK: Generated accessors for addresses
extension Route {
@objc(addAddressesObject:)
@NSManaged public func addToAddresses(_ value: Address)
@objc(removeAddressesObject:)
@NSManaged public func removeFromAddresses(_ value: Address)
@objc(addAddresses:)
@NSManaged public func addToAddresses(_ values: NSSet)
@objc(removeAddresses:)
@NSManaged public func removeFromAddresses(_ values: NSSet)
}
fuente