Building the iOS Hybrid Web Container Using the Provided Source Code

Build a sample Hybrid Web Container.

Prerequisites

See Supported Hardware and Software for the most current version information for mobile device platforms and third-party development environments.

Task
  1. On your Mac, connect to the Microsoft Windows machine where SAP Mobile Platform is installed:
    1. In the Apple menu, click Go > Connect to Server.
    2. Enter the name or IP address of the machine.
      For example, smb://machine DNS name or smb://IP Address.
  2. Copy the iOS_HWC_version.tar.gz archive from SMP_HOME\MobileSDKversion\HybridApp\Containers\iOS\ to a location on your Mac.
    In the archive file name, version is the current SAP Mobile Server version number. For example, iOS_HWC_2.3.0.tar.gz.
  3. Unpack iOS_HWC_version.tar.gz.
    The extraction creates a HybridWebContainer directory.
  4. In the HybridWebContainer directory, double-click HWC.xcodeproj to open it in the Xcode IDE.
  5. If you are building for a device, you must add provisioning profiles to the project to be able to sign the executable.
    1. In Xcode, click the HWC project and select the HWC target.
    2. Select the Build Settings tab.
    3. Under the Code Signing section, add code-signing identities for each configuration (Debug, Release, or Distribution) you want to build, depending on how you will deploy the app.
      When you build the Hybrid Web Container using your provisioning profile, you are creating your own version of the application.You can reuse the bundle ID that is distributed with the HWC template project, but you cannot upgrade your custom-built application through the normal means.
      The reason for this is because on iOS the Keychain is used to store information and Keychain rights depend on the provisioning profile used to sign your application. Therefore, you should consistently use the same provisioning profile across different versions of your application. Follow the instructions in Using Multiple Hybrid Web Containers on the Same iOS Device when you build the HWC template source.
  6. In Xcode, click Product > Build to build the project.