Installing the iOS development tools

A Mac OS X computer with Oracle JDK and Xcode installed is required to build the iOS mobile apps.

About this task

You use your Apple ID to enroll in a developer program. You can enroll in the iOS Developer Program as an individual or a company in which an individual is a one-person team.

You can also enroll in the iOS Developer Enterprise Program as a company, which authorizes you to create proprietary in-house iOS apps. The procedure for setting up the iOS Developer Enterprise account might include extra steps.

The person who creates the team becomes the team agent who is the legal contact and administrator of the team and has all privileges and full access to Member Center and iTunes Connect. The team agent is required to complete steps 5-7. iOS developers might require the assistance of the team agent to complete the procedure.

You create provisioning profiles to manage the use of iOS apps that you develop.

A development provisioning profile regulates the development and testing of apps to a specific number of devices. Development provisioning profiles for the apps must contain the IDs of the devices on which the app is installed. You can register more iOS devices and add them to the provisioning profiles.

A distribution provisioning profile provides access to the app store from all of the devices in your enterprise.

Procedure

  1. Install Oracle JDK version 8.0.
    1. From the Oracle Java™ SE downloads page, download the Java SE Development Kit for your operating system.
    2. Run the executable file and complete the installation program.
    3. In a terminal, go to the home directory cd ~.
    4. Enter echo $JAVA_HOME.
    5. If the result is empty, enter sudo nano .bash_profile. This step requires your system password.
    6. In the .bash_profile file window, enter export JAVA_HOME=$(/usr/libexec/java_home), and save and close the file.
    7. To reload the terminal and read what you put in the files, enter source ~/.bash_profile.
    8. Enter echo $JAVA_HOME. Verify that the path is /Library/Java/JavaVirtualMachines/jdk_version/Contents/Home.
  2. Create an environment.plist file in the ~/Library/LaunchAgents/ directory and specify the following content, which substitutes your actual level of JDK. Replace the value jdk1.8.0_x.jdk with the value of your installed version.
    <?xml version="1.0" encoding="UTF-8"?> 
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" 
    "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
      <key>Label</key>
      <string>my.startup</string>
      <key>ProgramArguments</key>
      <array>
        <string>sh</string>
        <string>-c</string>
        <string>
        launchctl setenv JAVA_HOME /Library/Java/JavaVirtualMachines
        /jdk1.8.0_x.jdk/Contents/Home/
        </string>
      </array>
      <key>RunAtLoad</key>
      <true/>
    </dict>
    </plist>

    The .plist file activates after you reboot the system. You can also use the command launchctl load ˜/Library/LaunchAgents/environment.plist to launch it immediately.

  3. Create an Apple ID by registering as an Apple developer in the Apple Registration Center.
  4. Download and install Xcode IDE, including the iOS SDK and Simulator, from the Mac App Store.
  5. Add your Apple ID to Xcode.
  6. If you are the team agent, in Xcode create the certificate for the distribution provisioning profile. Download the certificate to your local environment.
  7. Register the App IDs.

    Create a unique ID for each app that you support. The app ID that you specify must be unique: Apple does not allow duplicate app IDs.

    The following table contains examples of bundle IDs that can be specified for the Maximo Anywhere apps. Replace the company_name value with your company name.

    App name Example bundle ID
    Asset Audit com.company_name.maximoanywhere.AssetAudit
    Asset Data Manager com.company_name.maximoanywhere.AssetDataManager
    Inspection com.company_name.maximoanywhere.Inspection
    Issues and Returns com.company_name.maximoanywhere.IssuesReturns
    Physical Count com.company_name.maximoanywhere.PhysicalCount
    Service Request com.company_name.maximoanywhere.ServiceRequest
    Transfers and Receiving com.company_name.maximoanywhere.Transfers
    Work Approval com.company_name.maximoanywhere.WorkApproval
    Work Execution com.company_name.maximoanywhere.WorkExecution

    To specify an identifier to represent a single app, click Explicit App ID and enter a unique ID for the app. Repeat this step for each app that you support.

  8. From the maximoanywhere_home\MaximoAnywhere\apps\app_name directory, open the application_descriptor.xml file and change the bundle ID strings to match the bundle IDs that you created.
  9. To support command line builds of our app, you must create a distribution provisioning profile. Ensure that you select the distribution certificate when creating this provisioning profile.
    1. Create a distribution provisioning profile for each app by using Member Center. When you generate a distribution provisioning profile, you are not required to provide IDs of the devices.
    2. Download each app's provisioning profile to your Mac OS X computer. Every time that a provisioning profile is updated, you must download the profile to the build server.
    When you run the app build and deployment process, the provisioning profiles are collected and stored in the iOS application archive file (IPA).
  10. Run the following command:
    ./build.sh all
  11. Optional: To test the app on a local device using Xcode, you must register the Device IDs for all of your test devices. You must also create a Developer Provisioning Profile for the app. While creating the provisioning profile, ensure that you select your developer certificate while creating the app and also the Device IDs of your test devices.
    1. Create a developer certificate for a development provisioning profile. Download the certificate and add it to the Keychain application.
    2. Register the Device IDs in Member Center. You can locate the unique device identifier (UDID) by connecting your device to the Mac OS X computer while Xcode or iTunes are running.
    3. Download the developer provisioning profile to your Mac OS X computer.