From 3caffadb393cada7d9bbc433e0c96e6650ed873a Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Mon, 22 Aug 2011 11:13:42 -0400 Subject: Integrated TestFlight SDK See https://testflightapp.com/sdk/doc/ --- Cartographic.xcodeproj/project.pbxproj | 118 ++++++++++++++++++++++++++++++++- Classes/Cart_CollectAppDelegate.m | 4 ++ Classes/MainMenuLayer.h | 1 + Classes/MainMenuLayer.m | 11 ++- Resources/feedback.png | Bin 0 -> 2621 bytes Resources/feedback2.png | Bin 0 -> 2924 bytes TestFlight.h | 35 ++++++++++ libTestFlight.a | Bin 0 -> 2413716 bytes 8 files changed, 164 insertions(+), 5 deletions(-) create mode 100644 Resources/feedback.png create mode 100644 Resources/feedback2.png create mode 100644 TestFlight.h create mode 100644 libTestFlight.a diff --git a/Cartographic.xcodeproj/project.pbxproj b/Cartographic.xcodeproj/project.pbxproj index efe08b2..945a239 100755 --- a/Cartographic.xcodeproj/project.pbxproj +++ b/Cartographic.xcodeproj/project.pbxproj @@ -101,6 +101,9 @@ 6C0C140E13F1C3EC003A31B2 /* ValuableObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C0C140D13F1C3EC003A31B2 /* ValuableObject.m */; }; 6C0C141113F2099B003A31B2 /* Cart.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C0C141013F2099B003A31B2 /* Cart.m */; }; 6C0C141413F20E98003A31B2 /* GameMode.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C0C141313F20E98003A31B2 /* GameMode.m */; }; + 6C19F15B14018EE900F9CCD3 /* libTestFlight.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6C19F15A14018EE900F9CCD3 /* libTestFlight.a */; }; + 6C19F1631401917500F9CCD3 /* feedback.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C19F1621401917500F9CCD3 /* feedback.png */; }; + 6C19F1651401917900F9CCD3 /* feedback2.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C19F1641401917900F9CCD3 /* feedback2.png */; }; 6C29041013EAEB590032DA0F /* TutorialBubble.m in Sources */ = {isa = PBXBuildFile; fileRef = 6C29040F13EAEB590032DA0F /* TutorialBubble.m */; }; 6C29041213EAEC8A0032DA0F /* framestuff.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C29041113EAEC8A0032DA0F /* framestuff.png */; }; 6C39CFE013FC2708002B21AF /* tutorial.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C39CFDF13FC2708002B21AF /* tutorial.png */; }; @@ -406,6 +409,10 @@ 6C0C141013F2099B003A31B2 /* Cart.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Cart.m; sourceTree = ""; }; 6C0C141213F20E98003A31B2 /* GameMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameMode.h; sourceTree = ""; }; 6C0C141313F20E98003A31B2 /* GameMode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GameMode.m; sourceTree = ""; }; + 6C19F15A14018EE900F9CCD3 /* libTestFlight.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libTestFlight.a; sourceTree = ""; }; + 6C19F15D14018FDF00F9CCD3 /* TestFlight.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestFlight.h; sourceTree = ""; }; + 6C19F1621401917500F9CCD3 /* feedback.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = feedback.png; sourceTree = ""; }; + 6C19F1641401917900F9CCD3 /* feedback2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = feedback2.png; sourceTree = ""; }; 6C29040E13EAEB590032DA0F /* TutorialBubble.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TutorialBubble.h; sourceTree = ""; }; 6C29040F13EAEB590032DA0F /* TutorialBubble.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TutorialBubble.m; sourceTree = ""; }; 6C29041113EAEC8A0032DA0F /* framestuff.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = framestuff.png; sourceTree = ""; }; @@ -622,6 +629,7 @@ 506EDBA5102F4C9F00A389B3 /* AVFoundation.framework in Frameworks */, 506EE1A91030508200A389B3 /* libcocos2d libraries.a in Frameworks */, 3F8395D113D746200059AEE8 /* libsqlite3.0.dylib in Frameworks */, + 6C19F15B14018EE900F9CCD3 /* libTestFlight.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -656,7 +664,7 @@ children = ( 504DFC8A10AF177C006D82FE /* LICENSE.cocos2d */, 504DFC8B10AF177C006D82FE /* LICENSE.cocosdenshion */, - 506EDAA3102F461B00A389B3 /* cocos2d Sources */, + 506EDAA3102F461B00A389B3 /* Libraries */, 2D500B1D0D5A766B00DBA0E3 /* Classes */, 29B97315FDCFA39411CA2CEA /* Other Sources */, 50F4144210692EE7002A0D5E /* Resources */, @@ -678,6 +686,7 @@ 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( + 6C19F15A14018EE900F9CCD3 /* libTestFlight.a */, 3F8395D013D746200059AEE8 /* libsqlite3.0.dylib */, DCCBF1B60F6022AE0040855A /* CoreGraphics.framework */, DCCBF1B80F6022AE0040855A /* Foundation.framework */, @@ -765,6 +774,8 @@ 3F7D0EC713D8E6B000B6CE14 /* Buttons */ = { isa = PBXGroup; children = ( + 6C19F1641401917900F9CCD3 /* feedback2.png */, + 6C19F1621401917500F9CCD3 /* feedback.png */, 6C39CFE113FC2713002B21AF /* tutorial2.png */, 6C39CFDF13FC2708002B21AF /* tutorial.png */, 3F7D0F4813D8F17C00B6CE14 /* highscores.png */, @@ -793,16 +804,17 @@ path = libs/cocoslive; sourceTree = ""; }; - 506EDAA3102F461B00A389B3 /* cocos2d Sources */ = { + 506EDAA3102F461B00A389B3 /* Libraries */ = { isa = PBXGroup; children = ( + 6C19F15D14018FDF00F9CCD3 /* TestFlight.h */, E02BBB19126CC2F5006E46A2 /* cocos2d */, 507ED67411C63903002ED3FC /* CocosDenshion */, 504DFC4110AF1557006D82FE /* cocoslive */, 50F41306106926B2002A0D5E /* FontLabel */, E0ECA41F134E5F2B00E7A048 /* TouchJSON */, ); - name = "cocos2d Sources"; + name = Libraries; sourceTree = ""; }; 507ED67411C63903002ED3FC /* CocosDenshion */ = { @@ -1363,6 +1375,8 @@ 6CC89DD913F2F4E6003704F7 /* Entitlements.plist in Resources */, 6C39CFE013FC2708002B21AF /* tutorial.png in Resources */, 6C39CFE213FC2713002B21AF /* tutorial2.png in Resources */, + 6C19F1631401917500F9CCD3 /* feedback.png in Resources */, + 6C19F1651401917900F9CCD3 /* feedback2.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1544,6 +1558,10 @@ INFOPLIST_FILE = Resources/Info.plist; INFOPLIST_PREFIX_HEADER = Versioning.h; INFOPLIST_PREPROCESS = YES; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)\"", + ); OTHER_LDFLAGS = ( "-all_load", "-ObjC", @@ -1570,6 +1588,10 @@ INFOPLIST_FILE = Resources/Info.plist; INFOPLIST_PREFIX_HEADER = Versioning.h; INFOPLIST_PREPROCESS = YES; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)\"", + ); OTHER_LDFLAGS = ( "-all_load", "-ObjC", @@ -1617,6 +1639,92 @@ }; name = Release; }; + 6C19F16C1401944500F9CCD3 /* Ad-Hoc */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_PREPROCESSOR_DEFINITIONS = ( + NS_BLOCK_ASSERTIONS, + NDEBUG, + ); + "GCC_THUMB_SUPPORT[arch=armv6]" = NO; + "GCC_THUMB_SUPPORT[arch=armv7]" = YES; + GCC_UNROLL_LOOPS = YES; + GCC_VERSION = com.apple.compilers.llvmgcc42; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 3.0; + SDKROOT = iphoneos; + STRIP_INSTALLED_PRODUCT = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Ad-Hoc"; + }; + 6C19F16D1401944500F9CCD3 /* Ad-Hoc */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALTERNATE_MODE = Entitlements.plist; + ALWAYS_SEARCH_USER_PATHS = YES; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = Cart_Collect_Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + ADHOC, + NS_BLOCK_ASSERTIONS, + NDEBUG, + ); + GCC_TREAT_WARNINGS_AS_ERRORS = NO; + HEADER_SEARCH_PATHS = libs; + INFOPLIST_FILE = Resources/Info.plist; + INFOPLIST_PREFIX_HEADER = Versioning.h; + INFOPLIST_PREPROCESS = YES; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)\"", + ); + OTHER_LDFLAGS = ( + "-all_load", + "-ObjC", + ); + PRODUCT_NAME = Cartographic; + TARGETED_DEVICE_FAMILY = 1; + WARNING_CFLAGS = "-Wall"; + }; + name = "Ad-Hoc"; + }; + 6C19F16E1401944500F9CCD3 /* Ad-Hoc */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_PREPROCESSOR_DEFINITIONS = ""; + GCC_TREAT_WARNINGS_AS_ERRORS = NO; + HEADER_SEARCH_PATHS = ( + libs/Chipmunk/include/chipmunk, + libs, + ); + PRODUCT_NAME = "cocos2d libraries"; + SKIP_INSTALL = YES; + ZERO_LINK = NO; + }; + name = "Ad-Hoc"; + }; + 6C19F16F1401944500F9CCD3 /* Ad-Hoc */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = "Ad-Hoc"; + }; 6C263DDD13F6F4A000116746 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -1688,6 +1796,7 @@ buildConfigurations = ( 1D6058940D05DD3E006BFB54 /* Debug */, 1D6058950D05DD3E006BFB54 /* Release */, + 6C19F16D1401944500F9CCD3 /* Ad-Hoc */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1697,6 +1806,7 @@ buildConfigurations = ( 506EE05F10304ED500A389B3 /* Debug */, 506EE06010304ED500A389B3 /* Release */, + 6C19F16E1401944500F9CCD3 /* Ad-Hoc */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1706,6 +1816,7 @@ buildConfigurations = ( 6C263DDD13F6F4A000116746 /* Debug */, 6C263DDE13F6F4A000116746 /* Release */, + 6C19F16F1401944500F9CCD3 /* Ad-Hoc */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1715,6 +1826,7 @@ buildConfigurations = ( C01FCF4F08A954540054247B /* Debug */, C01FCF5008A954540054247B /* Release */, + 6C19F16C1401944500F9CCD3 /* Ad-Hoc */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Classes/Cart_CollectAppDelegate.m b/Classes/Cart_CollectAppDelegate.m index 158f660..0af3ac0 100755 --- a/Classes/Cart_CollectAppDelegate.m +++ b/Classes/Cart_CollectAppDelegate.m @@ -13,6 +13,7 @@ #import "GameMode.h" #import "RootViewController.h" #import "MainMenuLayer.h" +#import "TestFlight.h" @implementation Cart_CollectAppDelegate @@ -42,6 +43,9 @@ - (void) applicationDidFinishLaunching:(UIApplication*)application { + // REMOVE THIS LINE FOR RELEASE BUILDS + [TestFlight takeOff:@"66a3925c85c93e7628c14d167ff6c1b7_MjM4MTEyMDExLTA4LTE3IDEzOjEyOjQ4Ljg2NDE2OQ"]; + [[UIApplication sharedApplication] setIdleTimerDisabled:YES]; NSMutableDictionary* registerDefaults = [NSMutableDictionary dictionaryWithObjectsAndKeys: diff --git a/Classes/MainMenuLayer.h b/Classes/MainMenuLayer.h index e43c5e1..4914b59 100755 --- a/Classes/MainMenuLayer.h +++ b/Classes/MainMenuLayer.h @@ -18,5 +18,6 @@ - (void)newgame; - (void)tutorial; - (void)highscores; +- (void)feedback; @end diff --git a/Classes/MainMenuLayer.m b/Classes/MainMenuLayer.m index 8b21fab..32b85cb 100755 --- a/Classes/MainMenuLayer.m +++ b/Classes/MainMenuLayer.m @@ -11,6 +11,7 @@ #import "ClassicGameMode.h" #import "TutorialMode.h" #import "Cart_CollectAppDelegate.h" +#import "TestFlight.h" @implementation MainMenuLayer @@ -47,8 +48,9 @@ CCMenuItemImage* newgameMenuItem = [CCMenuItemImage itemFromNormalImage:@"newgame.png" selectedImage:@"newgame2.png" target:self selector:@selector(newgame)]; CCMenuItemImage* tutorialMenuItem = [CCMenuItemImage itemFromNormalImage:@"tutorial.png" selectedImage:@"tutorial2.png" target:self selector:@selector(tutorial)]; CCMenuItemImage* highscoresMenuItem = [CCMenuItemImage itemFromNormalImage:@"highscores.png" selectedImage:@"highscores2.png" target:self selector:@selector(highscores)]; - - CCMenu* menu = [CCMenu menuWithItems:newgameMenuItem, tutorialMenuItem, highscoresMenuItem, nil]; + CCMenuItemImage* feedbackMenuItem = [CCMenuItemImage itemFromNormalImage:@"feedback.png" selectedImage:@"feedback2.png" target:self selector:@selector(feedback)]; + + CCMenu* menu = [CCMenu menuWithItems:newgameMenuItem, tutorialMenuItem, highscoresMenuItem, feedbackMenuItem, nil]; [menu alignItemsVertically]; menu.position = ccp(240, 100); [self addChild:menu]; @@ -75,4 +77,9 @@ [listController release]; } +- (void)feedback +{ + [TestFlight openFeedbackView]; +} + @end diff --git a/Resources/feedback.png b/Resources/feedback.png new file mode 100644 index 0000000..83af574 Binary files /dev/null and b/Resources/feedback.png differ diff --git a/Resources/feedback2.png b/Resources/feedback2.png new file mode 100644 index 0000000..5954cab Binary files /dev/null and b/Resources/feedback2.png differ diff --git a/TestFlight.h b/TestFlight.h new file mode 100644 index 0000000..cd98c52 --- /dev/null +++ b/TestFlight.h @@ -0,0 +1,35 @@ +// +// TestFlight.h +// libTestFlight +// +// Created by Colin Humber on 8/25/10. +// Copyright 2010 23 Divide Apps. All rights reserved. + +#import + +@interface TestFlight : NSObject { + +} + +/** + Add custom environment information + If you want to track a user name from your application you can add it here + */ ++ (void)addCustomEnvironmentInformation:(NSString *)information forKey:(NSString*)key; + +/** + Starts a TestFlight session + */ ++ (void)takeOff:(NSString *)teamToken; + +/** + Track when a user has passed a checkpoint after the flight has taken off. Eg. passed level 1, posted high score + */ ++ (void)passCheckpoint:(NSString *)checkpointName; + +/** + Opens a feeback window that is not attached to a checkpoint + */ ++ (void)openFeedbackView; + +@end diff --git a/libTestFlight.a b/libTestFlight.a new file mode 100644 index 0000000..aacc245 Binary files /dev/null and b/libTestFlight.a differ -- cgit 1.4.1