Heyzap Unity3D SDK
The Heyzap SDK allows players to check-in to your game, driving viral growth and promoting your game on our social graph. For typical applications, the Heyzap SDK will only take a few minutes to integrate.
Find out more about the Heyzap Mobile SDKs here.
Requirements
- The Heyzap Unity3D SDK supports Android 1.5+ when building for Android.
- The Heyzap Unity3D SDK supports iOS 3.0+ when building for iOS.
- The Heyzap Unity3D SDK requires internet access to pull information about your game.
SDK Contents
The Unity3D SDK can be found in the Heyzap SDK zip file under the unity-sdk directory. The unity-sdk directory contains:
heyzap.unitypackage: Code for the Heyzap SDK for both Android and iOS buildsios-only: Additional files required when building for iOS in Xcode.
Step 1: Install & Load the Heyzap SDK in Unity3D
-
Open the Heyzap SDK unitypackage into your project by double-clicking the
heyzap.unitypackagefrom the Heyzap SDK zip.
Import the package into your project by clicking ‘import’ in the bottom right of the ‘Importing package’ window.

-
Add the following line near the top of your game’s initialization code:
HeyzapLib.load("YOUR_APP_ID");Note: Replace YOUR_APP_ID with the app ID for the game in the Apple App Store if the game is going to be released for iOS. If the game is not going to be released on iOS you can omit this parameter completely. See below for more information on deploying to iOS.
-
You are now ready to add checkin buttons to your game!
Step 2: Prompt User To Check-in After Levels, High Scores etc.
You can additionally allow users to check-in with their score or level achievements. This normally goes at the end of a level and is a cool way to let them tell their scores/levels to their friends.
-
To prompt users to check in after a level, you call the following function:
HeyzapLib.checkin("I just completed level 10!");
Step 3: Show a Checkin Button on Your Game’s Menu Screen
To get the most checkins, and therefore drive increased growth, it is recommended you provide a ‘check-in’ button on your main screen or menu screen.
-
To bring up the check-in screen in your game, add a button somewhere in your game, and add the following code to the click action:
HeyzapLib.checkin();
You can find the source images for the checkin button in the sdk zip file.
Step 4: Additional iPhone Specific Configuration
To use the Heyzap Unity3D SDK with iOS devices you must follow the following additional steps.
-
Ensure your app has an App Store Id. This is a large number assigned to your app in iTunes Connect by Apple. You can get an app store id by completing all the steps necessary to submit an app short of uploading a binary.
-
When calling HeyzapLib.load() please pass in the App ID as follows,
HeyzapLib.load("YOUR_APP_ID"); -
In Unity3D, open the Build Settings dialog, then click on Player Settings…

-
Hit Build or Build And Run to generate the Xcode project for your game
-
In Xcode, drag all the files from the
unity-sdk/ios-onlyfolder in the Heyzap SDK zip into the Xcode project navigator.
-
In Xcode, select your project and open the Build Phases tab. Now expand the Link Binary With Libraries section and click the + button:

-
Select the CoreGraphics.framework file and click Add:

-
You can now build the Xcode project and test on your device as usual
Note: Make sure to specify Append when building and saving the generated XCode project. This will save you having to repeat the above steps.
Step 5: SDK Icon Overlay
To highlight to players that your game has integrated with Heyzap, we recommend overlaying the Heyzap icon onto your game icon. This will increase the installs of your game, highlighting to potential players that they can check into Heyzap from within your game.
In order to generate the icons, claim your game through the Heyzap developer dashboard. Once you have claimed your game, view that games details and then click “SDK Icon Overlays”. From here you can download the icons.
Step 6: Testing & Releasing
Testing your game with Heyzap before release is essential. This will ensure the game fully leverages the Heyzap features from the instant it is live.
Make sure to test your game with both the Heyzap application installed, and with Heyzap uninstalled, since the check-in process will be slightly different for each of those states.
Please also send a copy of your game after integrating with the Heyzap SDK to integration@heyzap.com so we can help with the testing process and so we can better promote your game.
For iOS please send a test build of the app to integration@heyzap.com. The UDID to build for is d504e5f2cc0d481c01d88ad6d71fc2870d1fa508. You can use http://www.testflightapp.com to help, or simply build directly.
Advanced SDK Usage
Hide the Checkin Prompt Overlay
If you would prefer not to show the checkin prompt on Android when loading the Heyzap sdk, you can pass an optional first parameter to load:
HeyzapLib.load(false);
If you are deploying to iOS you can make the following call instead:
HeyzapLib.load(false,"YOUR_APP_ID");
This is not recommended as it will reduce the number of checkins your game will receive, limiting promotional and viral potential.
Choosing Which URL Scheme is Used By Heyzap
If your game defines multiple URL schemes and you wish to choose a specific one to use when Heyzap switches back to your game, you can set this when calling load:
HeyzapLib.load("YOUR_APP_ID", "coolapp://");
App Store IDs & URL Schemes
Obtaining an App Store ID
The App Store ID is a large number assigned to your app in iTunes Connect by Apple. You can get an App Store ID by completing all the steps necessary to submit an app short of uploading your application.
Setting Up A URL Scheme
The Heyzap SDK requires your game to configure a URL scheme so that we can relaunch your app after players check in. You can specify any URL scheme you want in your app.
-
To add a URL scheme in Xcode, go to the Info section of your build target settings and click Add in the bottom right of the screen. From there you will be presented with a menu, from which you select Add URL type.

-
From there, you should specify the Identifier as
yourappnameand the URL scheme asyourappname. Make sure your chosen URL scheme contains no spaces or special characters.
Additional Questions?
If you have any additional questions about integrating with our SDK, please email integration@heyzap.com and we’ll walk you through the process.