Menu

Install Mobile Explorer for iOS

Install Mobile Explorer for iOS

This section shows you how to integrate qTest Mobile Explorer Agent to your application on iOS devices. These are the steps that you need to follow:

 

Download Mobile Explorer Agent

Download Mobile Explorer Agent from HERE.

Add Agent to Project

Notes: In this guideline, we use iFixit as a sample project

  • Extract the archived file
  • Add Mobile_eXplorer_Agent folder to your project by right click on root of your project on Project Navigator and select “Add Files to "iFixit"”...

  • In Add File dialog, make sure "Copy items if needed" option is checked and "Create groups" option is selected as well. Notes: "Create groups" option must be selected in order to successfully compile Mobile Explorer Agent for iOS

  • The project structure in Xcode will look like this:

  • To avoid effects on your current settings, we suggest you clone the active target for integration with Mobile Explorer Agent by right clicking on active targets and selecting “Duplicate” or pressing “CMD + D”. If you want to release your application to the App Store, just use an origin target.

  • Select a target that you want to run with Mobile eXplorer Agent -> Go to “Build Settings” and type “Other” in search box and double click on “Other Linker Flags” 

  • Add 3 flags to “Other Linker Flags” if they are missing:
    • -ObjC
    • -lstdc++
    • -l"sqlite3"

  • On “Build Settings”, type “Preprocessor Macros” in search box and double click on “Preprocessor Macros”

  • Add “MEXPLORER=1” to turn on Mobile Explorer Agent 

Enable Agent in App

After adding Mobile Explorer Agent to your project (step 2), you need to enable Mobile Explorer Agent by below snip codes.

Using Objective-C language

  • Import “MXExplorer.h” to on the top of Application Delegate (.m file)
    #if MEXPLORER == 1
    #import "MXExplorer.h"
    #endif
    
  • Import these sample codes to inside the “didFinishLaunchingWithOptions” function. We recommend calling Mobile eXplorer Agent from the main thread, because Mobile eXplorer Agent is not supported when called from other threads
    #if MEXPLORER == 1
        MXExplorer *explorer = [MXExplorer sharedInstance];
        explorer.theme = MXThemeLight;
        
        [explorer start];
    #endif
    

    The Mobile Explorer Agent supports 2 themes (Dark/Light). Please select the theme that is appropriate for your application. For example, if your application has light colors, you can select the dark theme.

  • Select the target with integrated Mobile Explorer Agent

Using Swift language

  • Create a bridging header file

  • Import Mobile Explorer Agent header into Bridging Header

    #if MEXPLORER == 1
    #import "../Mobile_eXplorer_Agent/include/Mobile_eXplorer_Agent/MXExplorer.h"
    #endif
    
  • Select a target that you want to be run with Mobile eXplorer Agent -> Go to “Build Settings” and type “Objective-C Bridging Header” in search box, then select “Objective-C Bridging Header” and enter the path of bridging header on your project

  • In Application Delegate (.swift file), import these sample codes to inside the “application(application, didFinishLaunchingWithOptions)” function. We recommend calling Mobile Explorer Agent from the main thread because Mobile Explorer Agent is not supported when called from other threads
    let explorer = MXExplorer.sharedInstance();
    explorer.theme = MXThemeLight;
        
    explorer.start();
    

    The Mobile Explorer Agent supports 2 themes (Dark/Light). Please select the theme that is appropriate for your application. For example, if your application has light colors, you can select the dark theme.

Build and Release

After you’ve finished the 3 steps above, your final task is to Build and Release your application to the Tester.

Subscribe To Our Blog
Powered by Zendesk