Version 2020

Setting up the Library Mobile project for iOS

To create a customized version of the MicroStrategy Library Mobile project for iOS provided with the Library Mobile SDK and make sure that it compiles and deploys successfully, you must first install the MicroStrategy Library Mobile for iOS SDK and then follow the steps below.

  1. Open the MicroStrategy Library Mobile for iOS project in Xcode

    Open the Templates/Template folder that you extracted from the DMG for the MicroStrategy Library SDK for iOS and double-click MicroStrategyLibrary.xcodeproj. The MicroStrategy Library Mobile for iOS project opens in Xcode.

  2. Choose your device/simulator

    Click the Library project and choose a device or simulator.

    By default, this is a universal app that can be installed on both iPhone and iPad.

  3. Update the bundle identifier with your application ID

    The bundle identifier stores the value of the application ID. By default, it is com.microstrategy.iphoneSample.

    1. Choose the MicroStrategyLibrary target.

    2. On the General tab, update the value of the Bundle identifier property with your application ID.
  4. Optionally, enable push notification

    Prior to Xcode 8, if the provisioning profile and the app ID enabled push notification, the application automatically had push notification enabled. Now you must do the following steps to enable push notification:

    1. Enable push notification in the "Capabilities" section of the target.
      1. Choose the target device under TARGETS.
      2. Select the Capabilities tab.
      3. Expand Push Notifications and select Add the Push Notifications feature to your App ID and Add the Push Notification entitlement to your entitlements file.
    2. Ensure that the apns-environment key exists in Entitlements.plist.

      If Xcode failed to add this automatically, you can add it manually.

      • For iPad, Entitlements.plist is located under SDK folder/MicroStrategyLibraryMobile/iPad.
      • For iPhone, Entitlements.plist is located under SDK folder/MicroStrategyLibraryMobile/iPhone.
  5. Optionally, update the URL scheme

    URL schemes identify the configuration URLs that will be recognized by the application. This step is required if you will be installing multiple instances of mobile applications built using the MicroStrategy Library Mobile SDK on the same device, and want to use different configuration URLS to deploy each application.  

    1. Double-click the appropriate property list file—Info_IPhone.plist or Info_IPad.plist—to open it in the property editor.  

    2. Navigate to URL types > Item 0 > URL Schemes > Item 0. The URL types property stores the values for all the URL schemes used by the application.  

    3. Delete any URL schemes that you do not want this application to recognize. For example, you might want to delete Item 0 which is mstr by default, or Item 1 which is mstripad by default. You should not delete the URL schemes that are used by Good Dynamics, Facebook, or Badge. They have specific uses and will not interfere with your deployments.

      A sample mobile configuration URL using mstr as the URL scheme is shown below:

      mstr://?url=http%3A%2F%2FmyServer%3A8080%2FMicroStrategy%2Fservlet%2FtaskProc%3FtaskId%3DgetMobileConfiguration%26taskEnv%3Dxml%26taskContentType%3Dxmlanf%26configurationID%3D191bf822-d405-4392-bfe2-809f5526dcecauthMode=1
    4. Add the URL schemes that will be used for the URL configuration for this application. For example, you might add a new Item 0 with a value set to app1mstr or a new Item 1 with a value set to app1mstripad.

      A sample mobile configuration URL using app1mstr as the URL scheme is shown below:

      app1mstr://?url=http%3A%2F%2FmyServer%3A8080%2FMicroStrategy%2Fservlet%2FtaskProc%3FtaskId%3DgetMobileConfiguration%26taskEnv%3Dxml%26taskContentType%3Dxmlanf%26configurationID%3D191bf822-d405-4392-bfe2-809f5526dcecauthMode=1
    5. Save your changes.  

  6. Optionally, disable Bitcode for your project

    Following Apple's recommended practice, the MicroStrategy Library Mobile SDK enables Bitcode by default. As a result, the DMG file size is increased and the size of the application is increased when you build it. This is expected behavior.

    If you want to disable Bitcode for your project, select a target and do the following:

    • Set the Enable Bitcode build setting to "No"

      1. Click the Build Settings tab.
      2. Click All and scroll down to Build Options or search for Enable Bitcode
      3. Expand Build Options and set Enable Bitcode to "No".
    • Set the BITCODE_GENERATION_MODE setting to "marker"

      1. Click the Build Settings tab.
      2. Click the plus sign ( + ) to the far right of All and choose Add user-defined setting.
      3. Enter BITCODE_GENERATION_MODE as the NEW_SETTING and set its value to "marker".
  7. Build the project to confirm that it compiles and deploys successfully  

    1. Click Run to compile and deploy the application. If you chose to deploy it to a simulator during development and testing, you see the results on your computer screen.  

    2. After testing is complete, deploy the application to a device. From the drop-down list at the top left of the window, choose either an iPhone or iPad device and click Run. You see the results on your device.

Your project is now ready to be customized.