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,504
  • 7
  • 51
  • 92
Jordan Smith
  • 10,222
  • 7
  • 67
  • 111

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
  • 2,987
  • 1
  • 18
  • 22
0

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

borrrden
  • 32,952
  • 8
  • 73
  • 109