0

I have converted non-ARC project into ARC, but XCode5.0 is giving below warning for line

@property (nonatomic) NSNumber *latitude;

Warning: No 'assign', 'retain', or 'copy' attribute is specified - 'assign' is assumed

When I add strong life time qualifier then Warning goes out.

@property (nonatomic, strong) NSNumber *latitude;

Under ARC, strong is the default for object types, so why XCode is giving warning if I dont mention its a strong property?

Gaurav Borole
  • 796
  • 2
  • 13
  • 32
  • 1
    http://stackoverflow.com/questions/1662772/nsstring-no-assign-retain-or-copy-attribute-is-specified – iPatel Feb 11 '14 at 06:29
  • Thanks..Yes I know this is abovious error in non-ARC project. As I mentioned I am getting this error after enabling ARC and converting non-arc project into ARC. – Gaurav Borole Feb 11 '14 at 06:33
  • 1
    Yes, I have tried cleaning. If I add strong then error goes out. – Gaurav Borole Feb 11 '14 at 06:48
  • Check Objective C Automatic Reference Counting flag in build settings of your project is Yes or No. I think your project is not converted to ARC properly. – Aniket Kote Feb 11 '14 at 09:47
  • Yes Checked Flag is set to YES, Its running properly without crashing..first I enabled ARC in project setting and then converted project into ARC using option provided using XCode(Edit->Refactor->Convert to Objective-C ARC). Also did some changes manually at some places for ARC. – Gaurav Borole Feb 11 '14 at 11:41

1 Answers1

0

Did you through "Edit->Refactor->Convert to Objective-C ARC" to enable ARC? Or just change project setting? You can try first method to convert project to ARC.

simalone
  • 2,768
  • 1
  • 15
  • 20
  • Thanks..But Yes first I enabled ARC in project setting and then converted project into ARC using option provided using XCode(Edit->Refactor->Convert to Objective-C ARC). Also did some changes manually at some places for ARC. – Gaurav Borole Feb 11 '14 at 08:34