Xcode 15: Core Data : No NSValueTransformer with class name *** was found for attribute YYY on entity ZZZ for custom `NSSecureUnarchiveFromDataTransformer`

Hi, I am creating a custom NSSecureUnarchiveFromDataTransformer in order to handle attributes of entities of type NSDateComponents. It all works and I did not see any warnings in the "Issue navigator" inside Xcode but with Xcode 15 I started seeing this warning:

/Users/.../CustomNSSecureUnarchiveFromDataTransformer/CoreData:1:1 no NSValueTransformer with class name 'CustomSecureUnarchiveFromDataTransformer' was found for attribute 'testDate' on entity 'Item'

My use case is very simple, I have this custom transformer:

@objc(CustomSecureUnarchiveFromDataTransformer)
final class CustomSecureUnarchiveFromDataTransformer: NSSecureUnarchiveFromDataTransformer {
    
    override class var allowedTopLevelClasses: [AnyClass] {
        return [NSDateComponents.self]
    }
    
    static let name = NSValueTransformerName(rawValue: String(describing: CustomSecureUnarchiveFromDataTransformer.self))
    
    public static func register() {
        let transformer = CustomSecureUnarchiveFromDataTransformer()
        ValueTransformer.setValueTransformer(transformer, forName: name)
    }
}

which is set to the Core data entity's "Transformer":

which leads to the warning in Xcode 15.

App works just fine and there are no problems during run time, but this warning is shown and I want to fix it.

Here is a simple test project https://github.com/VladimirAmiorkov/CustomNSSecureUnarchiveFromDataTransformer

I'm also seeing this issue recently and cannot figure out why. Nothing has changed from my end, and everything works as expected.

  1. Transformable field in data model
  2. Correct class in the Transformer field
  3. Class is registered early in app lifecycle (in same class as Core Data container is created)
  4. Not using Swift Data
  5. Am using model versions in .xcdatamodel

It feels like an issue related to the analysis during build time.

I've submitted FB13311957.

I too am seeing this warning since Xcode 15 with no changes regarding the ValueTransformer classes. Feedback filed - FB13317269

Same problem here, filed as FB13323831.

My project is receiving the same set of warnings in this set up:

  • Sonoma (14.1).
  • Xcode 15.0.0 through Xcode 15.1.0 beta 3.

However, my project does not receive those warnings in this set up:

  • Ventura (13.6.1)
  • Xcode 15.0.0 through Xcode 15.1.0 beta 3.

Same thing here, filed as FB13448266

I have a workaround, but it clearly is a bug on Apple’s end.
I also filed a Feedback (FB13453227).

Did you received any update from Apple?

Submitted as FB13514588.

Still no fix in Xcode 15.4. Is anyone at Apple listening?!

Also filed feedback, FB13686151

Still present in Xcode 16 Beta 1.

Also filed feedback, FB14091781

Sigh....

FYI... we no longer see the warnings with Xcode 16.0.0 and macOS Sonoma 14.7.

Xcode 15: Core Data : No NSValueTransformer with class name *** was found for attribute YYY on entity ZZZ for custom `NSSecureUnarchiveFromDataTransformer`
 
 
Q