Integrate TestFlight SDK to Unity Project (improved)

Previously I posted a blog regarding an easy integration of TestFlight SDK to Unity project. However, it’s far from perfect, since you would have to manually update the generated code whenever the iOS project are rebuilt.

I worked more to find a much better way to handle it, and put the relate code to github so everyone could access it.

Here is the new integration steps:

  1. Sync it to your Unity project folder, make sure the source files (TestFlight*.*) are put in Assets/Plugins/iOS
  2. Get the TestFlight SDK from official website. Put TestFlight.h & libTestFlight.a under the same folder.

And how to use it:

Currently, these functions are now available in Unity:

TestFlightUnity.TakeOff(“<your TestFlight token>”); // Start the TestFlight. Call it once when your game starts

TestFlightUnity.PassCheckpoint(“<checkpoint name>”); // Log a checkpoint, which you could view later on TestFlight website

All the TestFlight functionality will be automatically integrated and activated after you build the project for iOS platform. No extra step is needed now!


Integrate TestFlight to Unity Project

To make a quick integration of TestFlight SDK only needs 3 steps:

  1. Download the official TestFlight SDK
  2. Create the folder “Assets/Plugins/iOS” under Unity project, and copy TestFlight.h & libTestFlight.a to that folder. Then build iOS project.
  3. In file* Add #import "../Libraries/TestFlight.h" to the header file section. Also add [TestFlight takeOff:@"<TeamToken>"];
    at the beginning of method - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions

That’s it!