Overview

Skill Level: Any

Prerequisites

To get started, you need:

Note: If you are using the SDK Manager on a Windows OS, please see the Getting started with the SDK Manager for Windows tutorial instead.

Step-by-step

  1. Downloading and starting the SDK Manager in MacOS X or Linux

    1. Download the SDK Manager folder from GitHub by selecting the Clone or download option here: https://github.com/ibm-watson-cxa/SDK_Tools
    2. Select Download ZIP and the SDK Tools will download.
      Note: You cannot download only the SDK Manager. This will download all the SDK Tools. The sdkmanager folder can be found within the SDK Tools folder.
    3. Open a Terminal Window and go to your chosen directory (this may be in your Downloads folder on your system).
    4. Run the command chmod 755 minstrument.sh to make the application launcher executable.
    5. Start the application by using the command ./minstrument.sh
    6. Log in with your IBMid credentials.
    7. Press Enter to accept the license.
  2. Updating the SDK

    Download the most current package with both the Tealeaf and Digital Analytics SDKs, input the command update -sdk cxa

    • To download the Tealeaf SDK alone, input the command update -sdk tealeaf
    • To download the Digital Analytics SDK alone, input the command update -sdk da
  3. Integrating the SDK

    Integrate the SDK into your mobile application by using the command ibmsetup -app -sdk <tealeaf/da>

    All setup commands require you to specify which SDK is being setup.

    • A sample command on Linux/MacOS X for an Android application is ibmsetup -sdk tealeaf -appKey XXXXXXXXXXXX -postMessageUrl https://websitename.com/XXXXXXX -killSwitchUrl https://websitename.com/XXXXXXXX -app /home/user/helloworldapp/app
      Note: A path to your application directory under the Android Studio project is needed.
    • A sample command on MacOS X for an iOS application is ibmsetup -sdk tealeaf -appKey XXXXXXXXXXXX -postMessageUrl https://websitename.com/XXXXXXX -killSwitchUrl https://websitename.com/XXXXXXXX -app /Users/user/helloworldapp/helloworldapp.xcodeproj -target MyTealeafproject
      Note: A path to the .xcodeproj is needed. Also, all iOS application auto-instrumentation requires a specific target.

    Note: The ibmsetup command is an alpha feature and might not work for some mobile applications. Review your application class and manually tweak the SDK configuration to test other features like Replay and Overstat.

     

    Required Parameters

    • -app
    • -target (only for iOS)
    • -sdk

    Optional Parameters

    However, without these parameters data won’t be sent and Replay won’t function, but they will not cause an error.

    • -postMessageUrl
    • -appkey
    • -killswitch
  4. Troubleshooting the SDK Manager.

    These procedures help identify and may fix common issues you could experience with the SDK Manager on Windows, MacOS X, or Linux.

    The following table provides solutions to SDK Manager common issues:

    Error Solution
    Exception in thread "main" java.lang.RuntimeException: java.io.IOException: Cannot run program "node": error=2,linebreak pdf No such file or directory at com.ibm.commerce.sdk.util.PlatformDependencyUtil.isNodeInstalled(PlatformDependencyUtil.java:36) This error occurs when you have not installed the node.js source code. To download and install, please visit Download Node.js

    ( after logging in successfully )
    Password: npm ERR! cb() never called!

    npm ERR! This is an error with npm itself. Please report this error at:
    npm ERR! <https://github.com/npm/npm/issues>

    npm ERR! A complete log of this run can be found in:
    npm ERR! /root/.npm/_logs/2017-12-13T02_08_57_581Z-debug.log

    Make sure you are running NPM version 5.4.1

     

Expected outcome

You can use the SDK Manager command line processes to complete tasks.

The help command opens a Glossary of Commands and their functions. The help <command_of_interest> command explains detailed usage of each command.

Command Usage
exit Exit
listsdks Shows a list of IBM SDKs
update Updates your SDK
outdated Checks if your SDK needs to be updated
upgrade Upgrades the Mobile SDK Installer.
Note: This command does not update the respective IBM SDKs.
package Packages the IBM SDK Release in a .zip file.
ibmsetup Setup and Integrate an IBM Mobile SDK into your Mobile App
Note: This is an alpha feature and might not work for some mobile applications. Review your application class and manually tweak the SDK configuration to test other IBM Tealeaf features like replay and overstat.
help Displays help information for available commands.

 

2 comments on"Getting started with the SDK Manager for MacOS X and Linux"

  1. Jagadesh Seeram March 29, 2018

    Please correct the spelling mistake in this command ‘chmod 755 minsturment.sh’ -> minstrument.sh

Join The Discussion

Your email address will not be published. Required fields are marked *