What does @NSManaged do?

Yes, it kinda really acts like @dynamic — technically it might be identical even. Semantically there is a slight difference:

@dynamic says ‘compiler, don’t check if my properties are also implemented. There might be no code you can see but I guarantee it will work at runtime’

@NSManaged now says ‘compiler, don’t check those properties as I have Core Data to take care of the implementation – it will be there at runtime’

so you could even say: @NSManaged is syntactic sugar that is a more narrow version of dynamic 🙂


https://github.com/KyoheiG3/DynamicBlurView/issues/2
here someone even used @NSManaged without CD because he wanted the @dynamic behaviour

Leave a Comment