2

My project is ARC enabled (the build settings have Objective-C Reference Counting set to YES). There are no file exceptions to this, it is enabled project wide. (Latest stable version of Xcode).

When I create an NSManagedObject subclass via File > New for a Core Data entity, the generated header uses the following in its property declarations:

@property (nonatomic, retain)

But 'retain' is not ARC!! Is this a bug, or is there something I'm missing or not understanding? There are no build warnings - if this is a bug though, how can I remedy it?

pasawaya
  • 11,515
  • 7
  • 53
  • 92
Jordan Smith
  • 10,310
  • 7
  • 68
  • 114

2 Answers2

3

retain is a synonym for strong. So it is perfectly valid to use retain or strong in this case.

For more detail check out this question.

Community
  • 1
  • 1
Michael Boselowitz
  • 3,012
  • 1
  • 19
  • 22
0

retain is a valid property declaration in ARC: See the clang documentation on it

borrrden
  • 33,256
  • 8
  • 74
  • 109