Unity Integration Guide

Introduction

This guide will walk you through integration of Kiip into a Unity project.

Download

Get the latest Unity package on our downloads page.

Existing Project

Libraries

Verify that you can link the following five libraries needed:

  • CoreTelephony.framework
  • QuartzCore.framework
  • SystemConfiguration.framework
  • AdSupport.framework
  • Passkit.framework
  • MediaPlayer.framework

Adding Kiip Permissions - Android

In your AndroidManifest.xml file, the following permissions will need to be requested in order to use the Kiip SDK:

<!-- Kiip -->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<!-- END -->

<!-- Kiip Optional Permissions -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<!-- END Kiip Optional Permissions -->

<!-- Add a meta-data & provider element to the application element -->
<application android:label="@string/app_name" ...>
    ...
    <meta-data android:name="me.kiip.sdk.AppKey" android:value="@string/kiip_app_key"/>

    <provider android:name="me.kiip.sdk.KiipSDKProvider"
          android:authorities="me.kiip.sdk.KiipSDKProvider<<KIIP_APP_KEY>>"
          android:exported="true" />
    ...
</application>
<!-- END Add a meta-data & provider element to the application element -->

Integration

  • Import the unitypackage into your project.
  • Drag the Kiip prefab into your loading scene (this should be placed in a scene that is only visited once so that only one will ever exist).
  • Configure your Kiip application information in the inspector for the Kiip GameObject.
  • Start calling any methods on the Kiip class wherever relevant for your game.
  • (Android only) Before building your APK, select the “Generate AndroidManifest.xml file” from the Kiip menu to create an AndroidManifest.xml file.

Demo Scene

Integration instructions for testing the demo scene:

  • Import the unitypackage into your project.
  • Open the KiipTestScene in Unity.
  • Configure your Kiip application information in the inspector for the Kiip GameObject.
  • (Android only) Before building your APK, select the “Generate AndroidManifest.xml file” from the Kiip menu to create an AndroidManifest.xml file.
  • Build and run on your device and watch the logs for relevant information.

Properties

public bool shouldAutoRotate
public DeviceOrientation interfaceOrientation
public string email
public string userId
public string gender
public DateTime birthday
public bool testMode

Methods

public static void saveMoment( string momentId )
public static void showPoptart()

Call a Kiip Moment

Kiip moments are events in your app to place a reward. The end user is allowed to earn rewards multiple times for the same moment. If there is a reward available, the SDK will display the reward to the user.

This is all you need to do to call a Kiip moment:

public static void saveMoment( string momentId )

Carefully consider your moment name. When you provide a title such as ‘finishing level one.’ it will be displayed to the end user when a reward is earned. The string for rewards is typically, “Congratulations! Here’s a reward for finishing level one.” This mean using an active verb such as ‘finishing’ and not ‘finished’ would be a more appropriate for a moment name.

You can always edit your moment names later in the dashboard.

Rewarded Video

Access more inventory, increase engagement and drive more revenue with Rewarded Video. To utilize Rewarded Video, designate and individual moments placement in the Kiip dashboard.

Kiip Rewarded Video Moment

Need Help?

We’re happy to answer any questions about integrating Kiip. Check out our FAQ or email us.