After Auto-ARC Conversion: Assigning retained object to unsafe property; object will be released after assignment After Auto-ARC Conversion: Assigning retained object to unsafe property; object will be released after assignment xcode xcode

After Auto-ARC Conversion: Assigning retained object to unsafe property; object will be released after assignment


I've run into the same warning and opened an Technical Support Incident. The engineer verified that the default was changed from "assign" to "strong" for reasons of consistency within ARC.

He said both the warning and the documentation are wrong and will be fixed. Until that is done, I would avoid the implicit default altogether!

Explicitly adding "strong" (as BJ Homer suggested) is a safe way to silence the warning and be compatible. But don't assume properties to be unretained by default. Always put "weak" or "assign" there, too.

Edit: The clang documentation now officially documents this change. The warning has been fixed.

Edit 2: Xcode 4.4 apparently includes the fix.


It looks wrong that it converted nonatomic, retain to nonatomic. I've always seen it convert to nonatomic, strong. If you can produce a simple project that converts in the way you saw it then I suggest filing a radar with it.

I assume by the way that you're using the latest Xcode.