Game Development Community

Adding the TestFlight SDK to iTorque 1.5

by Luis E Pabon · 11/13/2011 (6:20 pm) · 1 comments

I recently started using TestFlight, and fell in love with it. The most useful function it has is the SDK, which allows you to get information from your testers without them having to do anything.

Implementing the SDK is a very simple process. I have not fully implemented it, and the way I implemented some of it is not the most optimal way, but this resource should get you going in the right direction.

This tutorial should be done through Xcode.

First, go to the TestFlight SDK page, download the SDK and follow the tutorial they provide there until step 3.iii.

When you reach this point in the tutorial: "Launch TestFlight with your Team Token", go to "iTorque2D_1_5enginesourceplatformiPhone", open TGBAppDelegate.mm and make this single code modification at the very end of applicationDidFinishLaunching:
[TestFlight takeOff:@"YOUR ID"];

For reference, the code should go right below:
#if defined(_USE_SOCIAL_NETWORKING)
    socialNetworkingInit(self);
#endif //_USE_SOCIAL_NETWORKING

At this point, if you build the app it will be recognized by TestFlight and you will be able to get session hits on your Report page at TestFlight.

On my current project I have only needed to use the Checkpoint API, so that is the only implementation I have to contribute. You can add this almost anywhere in your project. I chose to add this in GameCenter.mm:

ConsoleFunction( passCheckpoint, void, 2, 2, "(checkPointName) Sends checkpoint to TestFlight.n"
                "@return No return value")
{
    NSString* identifier = [[[NSString alloc] initWithUTF8String:argv[1]] autorelease];
    [TestFlight passCheckpoint:identifier];
};

This function can be called in your game scripts like this:
passCheckpoint("StartGame");

I hope you find this tutorial helpful. If you have any questions or feedback feel free to post!

#1
04/30/2012 (6:37 pm)
Thanks for this. Bookmarking it for later because I most definitely want to do this.