Show TOC

Setting Up the Development EnvironmentLocate this document in the navigation structure

To build Hybrid SDK (Kapsel) applications, you must first set up your development environment, which includes installing both SAP Mobile Platform Server, and the SAP Mobile Platform SDK.

Prerequisites
  • Verify that you can access SAP Mobile Platform Server from your machine
  • If you are using Windows, download and extract Apache Ant and add it to the system variable path, PATH=%PATH%;C:\apache-ant-<version>\bin. See http://ant.apache.orgInformation published on non-SAP site.

See https://support.sap.com/release-upgrade-maintenance/pam.htmlInformation published on SAP site to verify that you are using the supported versions for the Hybrid SDK (Kapsel) development environment.

Windows 8.1 Requirements

To build Hybrid SDK (Kapsel) apps for Windows 8.1, you need:

  • Microsoft Visual Studio 2013 Update 2
Android Requirements

Android tools run on Windows, Linux, and OS X. To build Hybrid SDK (Kapsel) apps for Android, you need:

  • Java Development Kit (JDK)
  • Android SDK

See the Apache Cordova documentation at http://cordova.apache.org/docs/en/3.0.0/guide_platforms_android_index.md.html#Android%20Platform%20Guide Information published on non-SAP site for more information about getting started with Android.

Installing the Java SDK

See http://www.oracle.com/technetwork/java/javase/downloads/index.htmlInformation published on non-SAP site.

After installing the Java SDK, define the JAVA_HOME environment variable.

Download the Plugins

Set up the Android Development Environment by downloading the required plugins.

Prerequisites:
  1. Start the Eclipse environment.
  2. From the Help menu, select Install New Software.
  3. Click Add.
  4. In the Add Repository dialog, enter a name for the new plugin.
  5. Enter one of the following for URL:
    • https://dl-ssl.google.com/android/eclipse/
    • http://dl-ssl.google.com/android/eclipse/
  6. Click OK.
  7. Select Developer Tools and click Next.
  8. Review the tools to be downloaded.
  9. Click Next.
  10. Read and accept the license agreement and click Finish.
  11. Once the installation is complete, restart Eclipse.
Installing the ADT Plugin
Follow the instructions for installing the ADT Plugin for Eclipse at http://developer.android.com/sdk/installing/installing-adt.htmlInformation published on non-SAP site.

If you prefer to work in an IDE other than Eclipse, you do not need to install Eclipse or ADT. You can simply use the Android SDK tools to build and debug your application.

Installing the Google USB Driver

The Google USB Driver for Windows is as an optional SDK component you need only if you are developing on Windows and want to connect a Google Android-powered device (such as a Nexus 7) to your development environment over USB.

Download the Google USB driver package from http://developer.android.com/sdk/win-usb.htmlInformation published on non-SAP site.

Installing the Android SDK

Install the Android SDK for plugin use with your IDE.

  1. Confirm that your system meets the requirements at http://developer.android.com/sdk/requirements.htmlInformation published on non-SAP site.
  2. Download and install the supported version of the Android SDK starter package.
  3. Add the Android SDK to your PATH environment variable:

    On Windows, add <Android SDK Location>\tools to the PATH environment variable

    On OS X, the command is: export PATH=$PATH:<path to Android SDK>/tools

  4. Launch the Android SDK Manager and install the Android tools (SDK Tools and SDK Platform-tools) and the Android API.
  5. Launch the Android Virtual Device Manager, and create an Android virtual device to use as your emulator.
    Note (For offline applications only) Due to limitation on the emulator, you cannot determine the network connection state. For more information on other limitations, see Emulator Limitations in http://developer.android.com/tools/devices/emulator.html#limitationsInformation published on non-SAP site at the Android Developer Web site.
iOS Requirements

To build Hybrid SDK (Kapsel) apps for iOS, you need:

  • Mac OS X
  • Xcode and Xcode command line tools
  • For testing on iOS devices (not the simulator), you need:
    • An Apple Developer account
    • iOS development certificate
    • Provisioning files for each device you are testing with

See the Apache Cordova documentation at http://cordova.apache.org/docs/en/3.0.0/guide_platforms_ios_index.md.html#iOS%20Platform%20Guide Information published on non-SAP site for more information about getting started with iOS.

Downloading the Xcode IDE

Download and install Xcode from the Apple Developers Web site.

  1. Go to http://developer.apple.com/downloads/Information published on non-SAP site.
    Note You must be a paying member of the iOS Developer Program. Free members cannot download the supported version.
  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.
Installing Git

See http://git-scm.com/book/en/Getting-Started-Installing-GitInformation published on non-SAP site.

Note If you are using a proxy server you must configure git.

On Windows:

git config --global http.proxy http://proxy:8080 
 git config --global https.proxy http://proxy:8080 

On Mac:

sudo git config --global http.proxy http://proxy:8080 
 sudo git config --global https.proxy http://proxy:8080 
Installing Node.js

Use Node.js v0.10.11 and later, and its package manager, npm, to install Apache Cordova. See http://nodejs.org/Information published on non-SAP site. You can see the version installed by using the node command: node –v.

You must add the Node.js folder to your system PATH.

Note If you are using a proxy server you must configure npm. At the command prompt, enter:

On Windows:

npm config set proxy  http://proxy_host:port 
npm config set https-proxy http://proxy_host:port

On Mac:

sudo npm config set proxy  http://proxy_host:port 
sudo npm config set https-proxy http://proxy_host:port
Installing the Apache Cordova Command Line Interface

See http://cordova.apache.org/docs/en/3.0.0/guide_cli_index.md.html#The%20Command-line%20InterfaceInformation published on non-SAP site. Follow all of the steps in the Cordova command line interface readme.md.

  1. Open a command prompt window, and enter:

    On Windows: npm install -g cordova@<latest_supported_version>

    On Mac: sudo npm install -g cordova@<latest_supported_version>

    The supported version of Cordova CLI for SAP Mobile Platform SDK 3.0 SP08 is 4.2. To install this Cordova command line interface version, enter:

    npm install -g cordova@4.2.0

    -g indicates that Apache Cordova should be installed globally.

    Note If you are installing on Mac and you see a warning message that you are installing globally into a root-only directory, run this command to change the owner of the command line interface installation folder:

    sudo chown -R user_name /usr/local/lib/node_modules/cordova

    You can copy the command text from the error message and paste it in at the command prompt at the bottom of the terminal window.

  2. On Mac, when prompted, enter your root user password.
  3. Verify the Cordova installation by entering this command at the command prompt, or in the terminal window:cordova –v

    The output shows the Cordova version installed, for example, 4.2.0.

    You should also scroll back through the entire installation history shown in the terminal and look for errors to verify the installation was successful.

Installing ios-sim

To allow the Cordova command line to start the iOS simulator on Mac, you must install ios-sim.

  1. Download the ios-sim tool files from https://github.com/phonegap/ios-simInformation published on non-SAP site.
  2. Open a terminal window, and enter: sudo npm install -g ios-sim
  3. When prompted, enter your root user password.
  4. Verify the ios-sim installation by entering this command in the terminal window: ios-sim --version

    The output shows the ios-sim version installed, for example, 1.8.2.