MicroStrategy ONE

Embedding Sample in iOS

Sample name: EmbeddingSample

iPad                                                                                           iPhone

      

Location: Available in the MicroStrategyMobile DMG

Functionality showcased: This sample illustrates how to embed MicroStrategy functionality in an existing mobile application. This sample uses a tabbed application. On the first tab, there is an MSTRObjectViewController that loads a MicroStrategy report. On the second tab, there is a UINavigationController with a native view controller. After the button is pressed, MicroStrategy content is pushed onto the navigation controller. For additional information, refer to Embed a Report or Document in iOS.

Using the sample: The following instructions will help you deploy this sample to your mobile device or simulator.

  1. Install the Mobile SDK on your development machine. 
    1. On a Mac® computer, go to the MicroStrategy Download site and download the iOS Client file for the latest Mobile SDK.

      The latest Mobile SDK may or may not be the same version as the version of Intelligence Server you are using.

    2. Double-click the downloaded MicroStrategy Mobile SDK.dmg file. 

    3. Click Agree to accept the terms of the license agreement. This opens the disk image. 

    4. Copy all the folders to your local drive. One of these folders is called Samples and it contains the embedding sample. 

    5. Eject the disk image. 

  1. Build and deploy the sample. 

    1. Navigate to Samples/EmbeddingSample
    2. Double-click EmbeddingSample.xcodeproj to launch the project in Xcode®

    3. Make sure that the appropriate scheme (MicroStrategyMobileIPhone or MicroStrategyMobileIPad for iPhone and iPad respectively) is correctly selected. 

    4. Click the Run button to compile and deploy the application to a simulator. Confirm that it compiles and deploys successfully.

      To upload the application to a device, set the destination in the scheme to the mobile device and then build and run. For other requirements on deploying to a device, refer to documentation from Apple. You can access useful links to the Apple documentation from the Distributing iPhone or iPad Applications topic.
         

  2. Use the sample. 

    1. Launch the EmbeddingSample application from the mobile device or simulator.

    2. An MSTRObjectViewController that loads a report is displayed.

      iPad                                                                                           iPhone

            

    3. Tap the Custom tab, and a UINavigationController with a native view controller is displayed. There is a UIButton in the middle of this view controller.

      iPad                                                                                           iPhone

            

    4. Tap the Run document button, and MicroStrategy content is pushed onto this navigation controller.

      iPad                                                                                           iPhone

            

    5. You can customize the connection information for this sample so that it points to machines and projects in your environment. See Connection Info Properties File for information on how to do this.