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!

Advertisement

9 thoughts on “Integrate TestFlight SDK to Unity Project (improved)

  1. Awesome work! One question we are trying to get the device id using this code
    [TestFlight setDeviceIdentifier:[[UIDevice currentDevice] uniqueIdentifier]];

    Do you have any advice on where and how to do this from within your code?

    Thanks!

    • If should be added into

      void TestFlight_TakeOff(const char* token)
      {
      [TestFlight setDeviceIdentifier:[[UIDevice currentDevice] uniqueIdentifier]]; // <–
      [TestFlight takeOff:[NSString stringWithUTF8String:token]];
      }

      However, this line must be removed before submitting to App Store.

      • Do you have the code example on how to integrate the Feedback API of the sdk?
        Or do you not use this in your testing?
        Thanks JR

      • No. From my experience, the TF Feedback API is not much helpful. Placing a “mail to” button is usually more efficient.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s