Skip to content

Creating a new project that uses zkSforce

Simon Fell edited this page Sep 15, 2016 · 7 revisions

** This is hopelessly out of date, if you can't get it going from the general info here, use cocoa-pods.

Here are the steps to add zkSforce to a new project in Xcode. (this assumes xcode 3.2)

For newer versions of Xcode and target OS here are the bare headlines of things to set up:

  • Add libxml2 (including search paths for the associated header files) to your project. How to do it varies from version to version. For Xcode 3.2 you find a detailed description below.
  • For projects with ARC (Automatic Reference Counting) you must mark all objects to be compiled without ARC by adding the compile flag "-fno-objc-arc" to all .m files (Target - Build Phases)
  • For iOS9+/OSX10.11 ATS (Apple Transport Security) is active. It seems that salesforce.com does not support PFS (Perfect Forward Secrecy). See the readme.md file for details on how to update the info.plist to handle this.

Here is how to add libxml2 to your projects in Xcode 3.2:

  • In your project, create a new group to contain the zksforce source files
  • Right click on the group and select Add existing files, navigate to the directory where you put zksforce, and select all the files.
  • On the add dialog sheet, leave everything on the defaults.

  • expand the Frameworks group, and right click on Linked Frameworks and select add existing framework

  • scroll down the list of frameworks until you find libxml2.2.dylib (you can use the filter selector at the top of the dialog to select just dylibs)

  • Now we need to add libxml to the header search path, right click on the project and select get info to get to the compile options

  • scroll down the list to find the serch paths section, (and/or enter search in the search filter to reduce the size of the list).

  • double click on header search paths, and enter "/usr/include/libxml2" into the dialog

  • close the settings window, and go ahead and build, you should get a clean build and now your ready to go!

  • For iOS projects, remove references to zkQueryResult_NSTableView.h/m since they break the build and apparently are not used anywhere...

Clone this wiki locally