You need to sign in to do that
Don't have an account?
Jorge2
Existing project with ARC?
I'm somewhat new to iOS development and have a start-up question: is it possible to use the Salesforce SDK with an existing project that has ARC enabled? If so, how?
Thank you
I was finally able to get things working by building according to the instructions, and adding SDK files to an existing project. I also needed to add git to my path; it's installed by XCode but wasn't found by the build script ("install.sh").
Thanks for the help and suggestions
All Answers
Add the SDK files as normal to your project, then just set those files' compiler flags to not use ARC: -fobj-no-arc
Thanks @jhersh1 - do I still need to build the SDK (run "./intsall.sh") and install the Salesforce project templates, or could I copy the ".a" file and headers from one of the sample apps?
If you're including the Salesforce SDK with an existing project, you don't need to use a template. The SalesforceSDK binaries are in the dist/SalesforceSDK/ folder, so you can just unzip the debug or release archive, as desired, and include the package in your project.
Given that libSalesforceSDK.a is a static library, you don't need to do anything special to use it in your ARC project; it should "just work". However, you'll likely need to include the other dependencies of libSalesforceSDK as well--SalesforceCommonUtils, SalesforceOAuth, and RestKit. These are all available under the dist/ folder as well.
Kevin - thank you very much for the complete & clear answer. Let me try that and I'll come back to mark the solution.
Unfortunately, it didn't work for me yet... I included the ".a" files in my project, but get lots of errors like: "Undefined symbols for architecture i386..."
I don't understand these errors - a Google search points me to lots of posts on Stackoverflow.com, and I tried to follow the various solutions offered there, but without success.
Any ideas?
Thanks
I was finally able to get things working by building according to the instructions, and adding SDK files to an existing project. I also needed to add git to my path; it's installed by XCode but wasn't found by the build script ("install.sh").
Thanks for the help and suggestions