Skip to content

Setting Up the iOS Development Environment

iOS Environment Requirements

Complete the prerequisites for developing a device application for the iOS platform, and set up the development environment.

Downloading the Xcode IDE

Download and install Xcode from the AppStore, or from the Apple Developers Web site, as described here:

  1. Go to http://developer.apple.com/downloads/

  2. Log in using your Apple Developer credentials.

  3. (Optional) To narrow the search scope, unselect all Categories except Developer Tools.

  4. Download the appropriate Xcode and SDK combination.

Note: See supported Apple iOS requirements at https://support.sap.com/release-upgrade-maintenance/pam.html

Downloading the SDK and Creating a Project and Importing the OData Libraries and Bundles

Retrieve the Native SDK zip file and set up the iOS development environment by downloading the required plugins and importing the associated iOS libraries into the iOS development environment.

Procedure

  1. Retrieve the SMPNativeSDK-3.1.x.x.zip (the latest one) from Software Downloads

    • Under Installations & Upgrades, select Access downloads.
    • Expand By Alphabetical Index (A-Z), select M, then select SAP MOBILE PLATFORM SDK 3.1.
    • Select SAP NATIVE SDK3.1.
    • Extract the contents of the .zip file to a temporary directory on a local disk on the target host.
  2. Start Xcode and select Create a new Xcode project. Under iOS, select Single View App.

  3. In the next pane, enter Product Name and set language to Objective-C and click Next.

  4. Select the temporary directory where you extracted the zip file to and navigate to the Tools directory, then the osx folder, copy the ilodata file to the Tools directory under C:\SAP\MobileSDK3.

  5. Navigate back to iOS directory (the temporary directory where you extracted the zip file to) and copy the libraries and includes folders to your Xcode project folder. Open the Build Phases tab, and within Link Binary with Libraries, add all necessary native frameworks.

    • Choose your project, rather than a specific target, and open the Build Settings tab:
    • In the Other Linker Flags section, add -ObjC and -all_load. If these settings are not visible, change the filter in the Build Settings bar from Basic to All.
    • Open the Build Phases tab, and within Link Binary with Libraries, add all necessary native frameworks.
    • In the header search path section adjust the path to look for public header files. Depending on where you copied the header files in previous steps, the path string looks like this:$(PROJECT_DIR)/includes/public/**
    • In the library search path section adjust the path to look for the binary files. Depending on where you copied the library files in previous steps, the path string looks like this:$(PROJECT_DIR)/libraries/$(BUILD_STYLE)-universal/*
  6. Build and run your project.