Skip to content
tstellanova-sfdc edited this page Dec 12, 2011 · 6 revisions

I get all kinds of compile errors when I build an SDK project using Xcode 4.0+. Errors like "ARC forbids explicit message send of 'release'"

The issue here is that somehow ARC (Automatic Reference Counting) got turned on in the xcode project. Currently we do not support ARC. Fortunately, it's easy to turn off ARC for a whole project:

Basically you click the project in the project navigator, select "Build Settings" in the middle pane tabs, search for "auto" in the searchbox, which should find "Objective-C Automatic Reference Counting". Toggle that value to "No".

Unfortunately the ARC checkbox in the New Project from Template dialog is not under our control as it comes from your personal Xcode settings (and if you've never run Xcode 4.0+ before, it's turned on by default).

SFOAuthCredentials initWithIdentifier:clientId: takes two parameters. What is the purpose of the "identifier" and "clientId" parameters?

The purpose of providing separate identifier and clientId parameters is that you can (potentially) allow the user to switch between user accounts on the same instance. Many applications will only allow one user login for the app: in this case you can simply provide a default value for identifier, eg: SFOAuthCredentials *credentials = [[[SFOAuthCredentials alloc] initWithIdentifier:@"MyIdentifier" clientId:remoteAccessConsumerKey] autorelease];

Clone this wiki locally