+ Start a Discussion

Automatic Reference Counting (ARC) in IOS

I am converting the Mobile SDK template project to ARC but it is not working. How does one use the Mobile SDK with automatic reference counting?





It's not currently possible to use ARC with the SDK. This feature is on our roadmap. 


Thanks. Looking forward to it.


You can use ARC with the template by creating the template with ARC off, and then use the Refactor tool from Xcode to convert the project to ARC. You can also select the specific files in which you with to have ARC off by adding the -fno-objc-arc flag to the file.


Seriously? The SDK does not support ARC?


Is there any indication on when this is supposed to change?


the iOS SDK supports ARC. The salesforce toolkit is not supporting ARC at this moment. However you can use ARC by following the tip posted by me above. According to an early post, ARC is in the roadmap.


Oh, okay. Never mind.


Just had one of those "Bulldog Briscoe" moments. "This stinks! This is total BS! ... Oh here it is. Never mind".


Nop. Refactoring as described by J2theC does not work. Hangs on "Authorizing" screen after refactor "Convert to Object-C ARC". 


Yeah I just found that out today.


But I am trying the flagging method. I think I'm having success.