In Xcode 4.3.2, when I run the ARC conversion refactoring tool, all my property parameters that were “saved” DO NOT change to “strong”,

In Xcode 4.3.2, when I run the ARC conversion refactoring tool, all my property parameters that were “saved” DO NOT change to “strong”. Is it “strong” right now or is it just a problem with Xcode 4.3.2?

Example:

Before

@property (nonatomic, retain) NSString * someString; 

After

 @property (nonatomic) NSString * someString; 
+7
source share
2 answers

"strong" is the default when using ARC (LLVM 3.1), so the new code is correct.
(before ARC, the default was "assign")
See http://clang.llvm.org/docs/AutomaticReferenceCounting.html#ownership.spelling.property

+1
source

Strong is the equivalent of saving without ARC. Therefore, when you switch from non-ARC to Xcode ARC, it does not understand the word “save” and therefore deletes it. Thus, an error is generated, or at least a warning, since all instance variables require at least two declared properties.

0
source

All Articles