Up

Integration for Unity

Download the latest version
Download V 1.0.2 Released: February 19, 2015

Requirements

For iOS support: requires iOS 6.0 or later.

For Android support: requires android 2.2 or later.

Release notes
v. 1.0.2
  • Change approach to ‘TakeScreenshot’ method for iOS
v. 1.0.1
  • Fixed the bug affecting ‘TakeScreenshot’ option in the development mode
  1. Download the latest version of Ubertesters SDK for Unity

    • Use download button above

  2. Add frameworks to the Unity project.

    1. Open your Unity project

    2. From the top menu select Assets → Import package → Custom Package…

    3. Select Unbertesters.unitypackage in the folder where you downloaded it and click Open

    4. You will be prompted with file selection dialogue. Check all files and click Import

  3. Enabling Android support.

    1. Build Unity project that requires Android support integration

    2. In this project’s folder navigate to Assets\Temp\StagingArea

    3. Open AndroidManifest.xml with text editor of choice

    4. Add permissions into <manifest> tag

      <?xml version="1.0" encoding="utf-8"?>
          <manifest xmlns:android="http://schemas.android.com/apk/res/android"
                    package="your package"
                    android:versionCode="1"
                    android:versionName="1.0">
      
          ...
      
          <!-- Ubertesters library user-permisions -->
          <uses-permission android:name="android.permission.GET_TASKS" />
          <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
          <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
          <!-- Ubertesters library user-permisions --/>
      
          ...
        </manifest>
                                      
    5. Open http://beta.ubertesters.com/projects and select your project, go to SDK Integration

    6. Copy “Ubertesters Project ID”

    7. Add “Ubertesters Project ID to project manifest file into <application> tag

      <application>
      
          ...
      
              <meta-data android:name="ubertesters_project_id" android:value="your project id"/>
      
          ...
      
      </application>
      To avoid manually performing these actions with every application build just copy edited file to Assets\Plugins\Android
  4. Enabling iOS support.

    1. Build Unity project that requires iOS support integration

    2. In this project’s folder open xcode project file

    3. Add frameworks to your Link Binary With Libraries Build Phase tab.

      Frameworks to be added:

      • AdSupport.framework,

      • QuartzCore.framework

      • CoreImage.framework,

      • SystemConfiguration.framework,

      • CoreTelephony.framework,

      • CoreLocation.framework.

      • AudioToolbox.framework.

      • OpenGLES.framework

      • CoreMotion.framework

    4. Select your Project in the Project Navigator

    5. Select the target you want to enable the SDK for

    6. Select the Build Phases tab

    7. Open the Link Binary With Libraries Phase

    8. Click the + to add a new library

    9. Find QuartzCore.framework in the list and add it

    10. Repeat Steps 2 – 6 until all targets you want to use the SDK with

    11. Open http://beta.ubertesters.com/projects and select your project, go to SDK Integration

    12. Copy “Ubertesters Project ID”

    13. Add “Ubertesters Project ID” to your app’s “Info.plist” with key “ubertesters_project_id”

      When you rebuild iOS project in prompt window use “append”. Otherwise if you press ‘Replace’ your changes to Xcode project will be overwritten and you’ll have to repeat step [4].
  5. Initializing Ubertesters

    To initialize Ubertesters, call Ubertesters.Initialize(this) from method Start() and Ubertesters.NotifyFrameUpdate () from Update() method of the main MonoBehavior

    Example:

    ...
    using UbertestersFramework;
    ...
    public class GameController : MonoBehaviour
    {
      ...
     void Start()
     {
            Ubertesters.Initialize(this);
            Ubertesters.OverrideRegisterLogCallback();
      }
    
     void Update()
     {
      Ubertesters.NotifyFrameUpdate ();
     }
       …
    }
    Once you call method Application.RegisterLogCallback(), Ubertesters exception handler will stop logging exceptions.
  6. List of available APIs:

    Static Function Description
    Initialize(MonoBehaviour monoBehaviour) Initialize Ubertesters with default parameters: ActivationMode.Slider LockingMode.DisableUbertestersIfBuildNotExist
    Initialize(MonoBehaviour monoBehaviour, LockingMode lockingMode) Initialize Ubertesters with specific behavior if build doesn’t exist*
    Initialize(MonoBehaviour monoBehaviour, LockingMode lockingMode, ActivationMode activationMode) Initialize Ubertesters with specific behavior if build doesn’t exist and specific activation method**
    Ubertesters.OverrideRegisterLogCallback(); Make Ubertesters framework start logging exceptions.
    SetOfflineModeEnabled(bool value) Offline mode switch. If offline mode is enabled, when disconnected from internet, Ubertesters will store all logs and issues locally. They will be sent after internet connection is restored. Enabled by the default.
    SetIsIgnored(bool value) Ignore user’s actions (touch, click, etc.).
    LogInfo(string message) Write to track information message with level “INFO”
    LogWarn(string message) Write to track information message with level “WARN”
    LogError(string message) Write to track information message with level “ERROR”
    TakeScreenshot() Captures screenshot
    ShowUtPage() Display Ubertesters page
    HideUtPage() Close Ubertesters page

    * Enum LockingMode

    LockingModeDisableUbertestersIfBuildNotExist Ubertesters will be disabled if build doesn’t exist
    LockingModeLockAppIfBuildNotExist Tested application will be locked if build doesn’t exist

    ** Enum ActivationMode:

    Slider Shows button for Ubertesters activation
    Shake No button, Ubertesters is activated by shaking the device
    Manually No button. Developer has to use functions ShowUtPage() and HideUtPage() to activate Ubertesters