Merge lp:~threeve/ubuntuone-ios-files/testflight-sdk into lp:~urbanape/ubuntuone-ios-files/auto-uploads-view

Proposed by Jason Foreman
Status: Merged
Approved by: Zachery Bir
Approved revision: 61
Merged at revision: 60
Proposed branch: lp:~threeve/ubuntuone-ios-files/testflight-sdk
Merge into: lp:~urbanape/ubuntuone-ios-files/auto-uploads-view
Diff against target: 457 lines (+324/-2)
7 files modified
.bzrignore (+1/-0)
Dependencies/TestFlightSDK/README.txt (+167/-0)
Dependencies/TestFlightSDK/TestFlight.h (+44/-0)
Dependencies/TestFlightSDK/release_notes.txt (+41/-0)
Files.xcodeproj/project.pbxproj (+43/-0)
Files/Files-Prefix.pch (+5/-2)
Files/FilesAppDelegate.m (+23/-0)
To merge this branch: bzr merge lp:~threeve/ubuntuone-ios-files/testflight-sdk
Reviewer Review Type Date Requested Status
Zachery Bir Approve
Review via email: mp+79697@code.launchpad.net

Description of the change

Added TestFlight SDK

To post a comment you must log in.
Revision history for this message
Zachery Bir (urbanape) wrote :

Looks good to me. I'll merge it into my branch.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.bzrignore'
--- .bzrignore 2011-07-18 16:25:02 +0000
+++ .bzrignore 2011-10-18 14:51:15 +0000
@@ -5,3 +5,4 @@
5Files.xcodeproj/*.mode1v35Files.xcodeproj/*.mode1v3
6Files.xcodeproj/xcuserdata6Files.xcodeproj/xcuserdata
7Files.xcodeproj/project.xcworkspace/7Files.xcodeproj/project.xcworkspace/
8U1TestFlightTeamToken.txt
89
=== added directory 'Dependencies/TestFlightSDK'
=== added file 'Dependencies/TestFlightSDK/README.txt'
--- Dependencies/TestFlightSDK/README.txt 1970-01-01 00:00:00 +0000
+++ Dependencies/TestFlightSDK/README.txt 2011-10-18 14:51:15 +0000
@@ -0,0 +1,167 @@
1Thanks for downloading the TestFlight SDK 0.7!
2
3This document is also available on the web at https://www.testflightapp.com/sdk/doc
4
51. Why use the TestFlight SDK?
62. Considerations
73. How do I integrate the SDK into my project?
84. Using the Checkpoint API
95. Using the Feedback API
106. Upload your build
117. Questions API
128. View your results
139. Advanced Exception Handling
14
15START
16
17
181. Why use the TestFlight SDK?
19
20The TestFlight SDK allows you to track how beta testers are testing your application. Out of the box we track simple usage information, such as which tester is using your application, their device model/OS, how long they used the application, logs of their test session, and automatic recording of any crashes they encounter.
21
22To get the most out of the SDK we have provided the Checkpoint API.
23
24The Checkpoint API is used to help you track exactly how your testers are using your application. Curious about which users passed level 5 in your game, or posted their high score to Twitter, or found that obscure feature? With a single line of code you can finally gather all this information. Wondering how many times your app has crashed? Wondering who your power testers are? We've got you covered. See more information on the Checkpoint API in section 4.
25
26Alongside the Checkpoint API is the Questions interface. The Questions interface is managed on a per build basis on the TestFlight website. Find out more about the Questions Interface in section 6.
27
282. Considerations
29
30
31Information gathered by the SDK is sent to the website in real time. When an application is put into the background (iOS 4.x) or terminated (iOS 3.x) we try to send the finalizing information for the session during the time allowed for finalizing the application. Should all of the data not get sent the remaining data will be sent the next time the application is launched. As such, to get the most out of the SDK we recommend your application support iOS 4.0 and higher.
32
33This SDK can be run from both the iPhone Simulator and Device and has been tested using Xcode 4.0.
34
353. How do I integrate the SDK into my project?
36
37
381. Add the files to your project: Project -> Add to Project -> TestFlightSDK
39
40 1. Copy items into destination folder (if needed): Checked
41 2. Reference Type: Default
42 3. Recursively create groups for added folders
43
442. Verify that libTestFlight.a has been added to the Link Binary With Libraries Build Phase for the targets you want to use the SDK with
45
46 1. Select your Project in the Project Navigator
47 2. Select the target you want to enable the SDK for
48 3. Select the Build Phases tab
49 4. Open the Link Binary With Libraries Phase
50 5. If libTestFlight.a is not listed, drag and drop the library from your Project Navigator to the Link Binary With Libraries area
51 6. Repeat Steps 2 - 5 until all targets you want to use the SDK with have the SDK linked
52
533. In your Application Delegate:
54
55 1. Import TestFlight: `#import "TestFlight.h"`
56 NOTE: If you do not want to import TestFlight.h in every file you may add the above line into you pre-compiled header (`<projectname>_Prefix.pch`) file inside of the
57
58 #ifdef __OBJC__ section.
59 This will give you access to the SDK across all files.
60
61 2. Get your Team Token which you can find at [http://testflightapp.com/dashboard/team/](http://testflightapp.com/dashboard/team/) select the team you are using from the team selection drop down list on the top of the page and then select edit.
62
63
64 3. Launch TestFlight with your Team Token
65
66 -(BOOL)application:(UIApplication *)application
67 didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
68 // start of your application:didFinishLaunchingWithOptions
69 // ...
70 [TestFlight takeOff:@"Insert your Team Token here"];
71 // The rest of your application:didFinishLaunchingWithOptions method
72 // ...
73 }
74
75 4. To report crashes to you we install our own uncaught exception handler. If you are not currently using an exception handler of your own then all you need to do is go to the next step. If you currently use an Exception Handler, or you use another framework that does please go to the section on advanced exception handling.
76
774. To enable the best crash reporting possible we recommend setting the following project build settings in Xcode to NO for all targets that you want to have live crash reporting for You can find build settings by opening the Project Navigator (default command+1 or command+shift+j) then clicking on the project you are configuring (usually the first selection in the list). From there you can choose to either change the global project settings or settings on an individual project basis. All settings below are in the Deployment Section.
78
79 1. Deployment Post Processing
80 2. Strip Debug Symbols During Copy
81 3. Strip Linked Product
82
834. Use the Checkpoint API to create important checkpoints throughout your application.
84
85When a tester passes a level, or adds a new todo item, you can pass a checkpoint. The checkpoint progress is used to provide insight into how your testers are testing your apps. The passed checkpoints are also attached to crashes, which can help when creating steps to replicate.
86
87`[TestFlight passCheckpoint:@"CHECKPOINT_NAME"];`
88Use `passCheckpoint:` to track when a user performs certain tasks in your application. This can be useful for making sure testers are hitting all parts of your application, as well as tracking which testers are being thorough.
89
905. Using the Feedback API
91
92To launch unguided feedback call the `openFeedbackView` method. We recommend that you call this from a GUI element.
93
94 -(IBAction)launchFeedback {
95 [TestFlight openFeedbackView];
96 }
97
98Once users have submitted feedback from inside of the application you can view it in the feedback area of your build page.
99
1006. Upload your build.
101
102After you have integrated the SDK into your application you need to upload your build to TestFlight. You can upload from your dashboard or or using the Upload API, full documentation at <https://testflightapp.com/api/doc/>
103
1047. Add Questions to Checkpoints
105
106In order to ask a question, you'll need to associate it with a checkpoint. Make sure your checkpoints are initialized by running your app and hitting them all yourself before you start adding questions.
107
108There are three question types available: Yes/No, Multiple Choice, and Long Answer.
109
110To create questions, visit your builds Questions page and click on 'Add Question'. If you choose Multiple Choice, you'll need to enter a list of possible answers for your testers to choose from &mdash; otherwise, you'll only need to enter your question's, well, question. If your build has no questions, you can also choose to migrate questions from another build (because seriously &mdash; who wants to do all that typing again)?
111
112After restarting your application on an approved device, when you pass the checkpoint associated with your questions a Test Flight modal question form will appear on the screen asking the beta tester to answer your question.
113
114After you upload a new build to TestFlight you will need to associate questions once again. However if your checkpoints and questions have remained the same you can choose "copy questions from an older build" and choose which build to copy the questions from.
115
1168. View your results.
117
118As testers install your build and start to test it you will see their session data on the web on the build report page for the build you've uploaded.
119
1209. Advanced Exception Handling
121
122An uncaught exception means that your application is in an unknown state and there is not much that you can do but try and exit gracefully. Our SDK does its best to get the data we collect in this situation to you while it is crashing, but it is designed in such a way that the important act of saving the data occurs in as safe way a way as possible before trying to send anything. If you do use uncaught exception or signal handlers install your handlers before calling `takeOff`. Our SDK will then call your handler while ours is running. For example:
123
124 /*
125 My Apps Custom uncaught exception catcher, we do special stuff here, and TestFlight takes care of the rest
126 **/
127 void HandleExceptions(NSException *exception) {
128 NSLog(@"This is where we save the application data during a exception");
129 // Save application data on crash
130 }
131 /*
132 My Apps Custom signal catcher, we do special stuff here, and TestFlight takes care of the rest
133 **/
134 void SignalHandler(int sig) {
135 NSLog(@"This is where we save the application data during a signal");
136 // Save application data on crash
137 }
138
139 -(BOOL)application:(UIApplication *)application
140 didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
141 // installs HandleExceptions as the Uncaught Exception Handler
142 NSSetUncaughtExceptionHandler(&HandleExceptions);
143 // create the signal action structure
144 struct sigaction newSignalAction;
145 // initialize the signal action structure
146 memset(&newSignalAction, 0, sizeof(newSignalAction));
147 // set SignalHandler as the handler in the signal action structure
148 newSignalAction.sa_handler = &SignalHandler;
149 // set SignalHandler as the handlers for SIGABRT, SIGILL and SIGBUS
150 sigaction(SIGABRT, &newSignalAction, NULL);
151 sigaction(SIGILL, &newSignalAction, NULL);
152 sigaction(SIGBUS, &newSignalAction, NULL);
153 // Call takeOff after install your own unhandled exception and signal handlers
154 [TestFlight takeOff:@"Insert your Team Token here"];
155 // continue with your application initialization
156 }
157
158You do not need to add the above code if your application does not use exception handling already.
159
160END
161
162Please contact us if you have any questions.
163
164The TestFlight Team
165
166w. http://www.testflightapp.com
167e. beta@testflightapp.com
0168
=== added file 'Dependencies/TestFlightSDK/TestFlight.h'
--- Dependencies/TestFlightSDK/TestFlight.h 1970-01-01 00:00:00 +0000
+++ Dependencies/TestFlightSDK/TestFlight.h 2011-10-18 14:51:15 +0000
@@ -0,0 +1,44 @@
1//
2// TestFlight.h
3// libTestFlight
4//
5// Created by Jonathan Janzen on 06/11/11.
6// Copyright 2011 TestFlight. All rights reserved.
7
8#import <Foundation/Foundation.h>
9#define TESTFLIGHT_SDK_VERSION @"0.7.2"
10
11@interface TestFlight : NSObject {
12
13}
14
15/**
16 Add custom environment information
17 If you want to track a user name from your application you can add it here
18 */
19+ (void)addCustomEnvironmentInformation:(NSString *)information forKey:(NSString*)key;
20
21/**
22 Starts a TestFlight session
23 */
24+ (void)takeOff:(NSString *)teamToken;
25
26/**
27 Sets custom options
28 Option Accepted Values Description
29 reinstallCrashHandlers [NSNumber numberWithBool:YES] Reinstalls crash handlers, to be used if a third party
30 library installs crash handlers overtop of the TestFlight Crash Handlers
31 */
32+ (void)setOptions:(NSDictionary*)options;
33
34/**
35 Track when a user has passed a checkpoint after the flight has taken off. Eg. passed level 1, posted high score
36 */
37+ (void)passCheckpoint:(NSString *)checkpointName;
38
39/**
40 Opens a feeback window that is not attached to a checkpoint
41 */
42+ (void)openFeedbackView;
43
44@end
045
=== added file 'Dependencies/TestFlightSDK/release_notes.txt'
--- Dependencies/TestFlightSDK/release_notes.txt 1970-01-01 00:00:00 +0000
+++ Dependencies/TestFlightSDK/release_notes.txt 2011-10-18 14:51:15 +0000
@@ -0,0 +1,41 @@
10.7.2 - September 29, 2011
2Changed TESTFLIGHT_SDK_VERSION string to be an NSString
3Fixed an issue where exiting an application while the SDK is active caused modal views to be dismissed
40.7.1 - September 22, 2011
5Internal release
6Refactoring
70.7 - September 21, 2011
8Moved TestFlight images and data to the Library/Caches folder
9Resolved an issue where sometimes the rootViewController could not be found and feedback, questions and upgrade views would not be displayed
10In application upgrade changed to allow skipping until the next version is installed and allows upgrades to be forced
11Fixed a memory leak when launching questions
120.6 - September 2, 2011
13Renamed base64_encode to testflight_base64_encode to remove a conflict with other third party libraries
14Added ability to reinstall crash handlers when they are overwritten using the setOptions API
15Fixed an issue where crash reports might not get sent under certain circumstances
16Fixed a deadlock when the application is put in the background and then resumed before all information can be sent
17Fixed an issue when attempting to un-install all signal handlers during a signal
18Added support for landscape mode on the iPad to the Questions and Feedback views
19Crash reporting now works in versions of Xcode earlier than 4.2
20Fixed a memory leak during handshake
210.5 - August 19, 2011
22Feedback that is not attached to a checkpoint [TestFlight openFeedbackView]
23Usability changes to question views
24Removed pause and resume sessions, replaced with sessions being stopped and started
25Added text auto correction to the Long Answer question type
26Crash reports now send on crash instead of next launch
270.4 - August 15, 2011
28In Application Feedback with Questions
29In application updates
30Custom Environment Information added
31Networking stack reimplementation
32Exception handling fixes
330.3 - June 15, 2011
34Removed all mention of JSONKit from the README
35Added support for using both the Bundle Version and the Bundle Short Version string
360.2 - June 14, 2011
37Removed all categories this allows users to use the SDK without having to set -ObjC and -load_all
38Prefixed JSONKit for use in TestFlight to remove reported issues where some users were already using JSONKit
39Added support for armv6 again
400.1 - June 11, 2011
41Initial Version
0\ No newline at end of file42\ No newline at end of file
143
=== modified file 'Files.xcodeproj/project.pbxproj'
--- Files.xcodeproj/project.pbxproj 2011-10-12 21:04:55 +0000
+++ Files.xcodeproj/project.pbxproj 2011-10-18 14:51:15 +0000
@@ -28,6 +28,7 @@
28 960D462E140DD22800B73177 /* U1FileNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 960D462D140DD22600B73177 /* U1FileNode.m */; };28 960D462E140DD22800B73177 /* U1FileNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 960D462D140DD22600B73177 /* U1FileNode.m */; };
29 960D4631140DD23600B73177 /* U1FolderNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 960D4630140DD23400B73177 /* U1FolderNode.m */; };29 960D4631140DD23600B73177 /* U1FolderNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 960D4630140DD23400B73177 /* U1FolderNode.m */; };
30 960D4635140DDBE400B73177 /* U1NodeChildrenResultSet.m in Sources */ = {isa = PBXBuildFile; fileRef = 960D4634140DDBE400B73177 /* U1NodeChildrenResultSet.m */; };30 960D4635140DDBE400B73177 /* U1NodeChildrenResultSet.m in Sources */ = {isa = PBXBuildFile; fileRef = 960D4634140DDBE400B73177 /* U1NodeChildrenResultSet.m */; };
31 963C16D0144346CC007A51D0 /* libTestFlight.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 963C16CB144346A6007A51D0 /* libTestFlight.a */; };
31 965D7EA814293B6700E4754F /* ic_act_publish_file.png in Resources */ = {isa = PBXBuildFile; fileRef = 965D7EA214293B6700E4754F /* ic_act_publish_file.png */; };32 965D7EA814293B6700E4754F /* ic_act_publish_file.png in Resources */ = {isa = PBXBuildFile; fileRef = 965D7EA214293B6700E4754F /* ic_act_publish_file.png */; };
32 965D7EA914293B6700E4754F /* ic_act_publish_file@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 965D7EA314293B6700E4754F /* ic_act_publish_file@2x.png */; };33 965D7EA914293B6700E4754F /* ic_act_publish_file@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 965D7EA314293B6700E4754F /* ic_act_publish_file@2x.png */; };
33 965D7EAA14293B6700E4754F /* ic_act_unpublish_file.png in Resources */ = {isa = PBXBuildFile; fileRef = 965D7EA414293B6700E4754F /* ic_act_unpublish_file.png */; };34 965D7EAA14293B6700E4754F /* ic_act_unpublish_file.png in Resources */ = {isa = PBXBuildFile; fileRef = 965D7EA414293B6700E4754F /* ic_act_unpublish_file.png */; };
@@ -168,6 +169,11 @@
168 960D4630140DD23400B73177 /* U1FolderNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = U1FolderNode.m; sourceTree = "<group>"; };169 960D4630140DD23400B73177 /* U1FolderNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = U1FolderNode.m; sourceTree = "<group>"; };
169 960D4633140DDBE400B73177 /* U1NodeChildrenResultSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = U1NodeChildrenResultSet.h; sourceTree = "<group>"; };170 960D4633140DDBE400B73177 /* U1NodeChildrenResultSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = U1NodeChildrenResultSet.h; sourceTree = "<group>"; };
170 960D4634140DDBE400B73177 /* U1NodeChildrenResultSet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = U1NodeChildrenResultSet.m; sourceTree = "<group>"; };171 960D4634140DDBE400B73177 /* U1NodeChildrenResultSet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = U1NodeChildrenResultSet.m; sourceTree = "<group>"; };
172 963C16CB144346A6007A51D0 /* libTestFlight.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libTestFlight.a; sourceTree = "<group>"; };
173 963C16CC144346A6007A51D0 /* README.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = README.txt; sourceTree = "<group>"; };
174 963C16CD144346A6007A51D0 /* release_notes.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = release_notes.txt; sourceTree = "<group>"; };
175 963C16CE144346A6007A51D0 /* TestFlight.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TestFlight.h; sourceTree = "<group>"; };
176 963C16D1144349D2007A51D0 /* U1TestFlightTeamToken.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = U1TestFlightTeamToken.h; sourceTree = "<group>"; };
171 965D7EA214293B6700E4754F /* ic_act_publish_file.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ic_act_publish_file.png; path = Assets/ic_act_publish_file.png; sourceTree = "<group>"; };177 965D7EA214293B6700E4754F /* ic_act_publish_file.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ic_act_publish_file.png; path = Assets/ic_act_publish_file.png; sourceTree = "<group>"; };
172 965D7EA314293B6700E4754F /* ic_act_publish_file@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "ic_act_publish_file@2x.png"; path = "Assets/ic_act_publish_file@2x.png"; sourceTree = "<group>"; };178 965D7EA314293B6700E4754F /* ic_act_publish_file@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "ic_act_publish_file@2x.png"; path = "Assets/ic_act_publish_file@2x.png"; sourceTree = "<group>"; };
173 965D7EA414293B6700E4754F /* ic_act_unpublish_file.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ic_act_unpublish_file.png; path = Assets/ic_act_unpublish_file.png; sourceTree = "<group>"; };179 965D7EA414293B6700E4754F /* ic_act_unpublish_file.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ic_act_unpublish_file.png; path = Assets/ic_act_unpublish_file.png; sourceTree = "<group>"; };
@@ -320,6 +326,7 @@
320 96E860B613F7251D0026783D /* UIKit.framework in Frameworks */,326 96E860B613F7251D0026783D /* UIKit.framework in Frameworks */,
321 96E860B813F7251D0026783D /* Foundation.framework in Frameworks */,327 96E860B813F7251D0026783D /* Foundation.framework in Frameworks */,
322 96E860BA13F7251D0026783D /* CoreGraphics.framework in Frameworks */,328 96E860BA13F7251D0026783D /* CoreGraphics.framework in Frameworks */,
329 963C16D0144346CC007A51D0 /* libTestFlight.a in Frameworks */,
323 );330 );
324 runOnlyForDeploymentPostprocessing = 0;331 runOnlyForDeploymentPostprocessing = 0;
325 };332 };
@@ -389,6 +396,17 @@
389 name = Model;396 name = Model;
390 sourceTree = "<group>";397 sourceTree = "<group>";
391 };398 };
399 963C16CA144346A6007A51D0 /* TestFlightSDK */ = {
400 isa = PBXGroup;
401 children = (
402 963C16CB144346A6007A51D0 /* libTestFlight.a */,
403 963C16CC144346A6007A51D0 /* README.txt */,
404 963C16CD144346A6007A51D0 /* release_notes.txt */,
405 963C16CE144346A6007A51D0 /* TestFlight.h */,
406 );
407 path = TestFlightSDK;
408 sourceTree = "<group>";
409 };
392 96733AEC140DFABB0074D545 /* SSO */ = {410 96733AEC140DFABB0074D545 /* SSO */ = {
393 isa = PBXGroup;411 isa = PBXGroup;
394 children = (412 children = (
@@ -562,6 +580,7 @@
562 96E860C313F7251D0026783D /* Files-Prefix.pch */,580 96E860C313F7251D0026783D /* Files-Prefix.pch */,
563 96733B13140E04940074D545 /* UIActionSheet+U1Additions.h */,581 96733B13140E04940074D545 /* UIActionSheet+U1Additions.h */,
564 96733B14140E04940074D545 /* UIActionSheet+U1Additions.m */,582 96733B14140E04940074D545 /* UIActionSheet+U1Additions.m */,
583 963C16D1144349D2007A51D0 /* U1TestFlightTeamToken.h */,
565 );584 );
566 name = "Supporting Files";585 name = "Supporting Files";
567 sourceTree = "<group>";586 sourceTree = "<group>";
@@ -588,6 +607,7 @@
588 96E860F413F726250026783D /* Dependencies */ = {607 96E860F413F726250026783D /* Dependencies */ = {
589 isa = PBXGroup;608 isa = PBXGroup;
590 children = (609 children = (
610 963C16CA144346A6007A51D0 /* TestFlightSDK */,
591 96E8614713F740E20026783D /* JSONKit */,611 96E8614713F740E20026783D /* JSONKit */,
592 96E860F513F7265B0026783D /* oauthconsumer */,612 96E860F513F7265B0026783D /* oauthconsumer */,
593 960D45F91409E09F00B73177 /* PullToRefresh */,613 960D45F91409E09F00B73177 /* PullToRefresh */,
@@ -678,6 +698,7 @@
678 buildPhases = (698 buildPhases = (
679 96E860AD13F7251D0026783D /* Sources */,699 96E860AD13F7251D0026783D /* Sources */,
680 96E860AE13F7251D0026783D /* Frameworks */,700 96E860AE13F7251D0026783D /* Frameworks */,
701 963C16D614437CF4007A51D0 /* ShellScript */,
681 96E860AF13F7251D0026783D /* Resources */,702 96E860AF13F7251D0026783D /* Resources */,
682 );703 );
683 buildRules = (704 buildRules = (
@@ -777,6 +798,20 @@
777/* End PBXResourcesBuildPhase section */798/* End PBXResourcesBuildPhase section */
778799
779/* Begin PBXShellScriptBuildPhase section */800/* Begin PBXShellScriptBuildPhase section */
801 963C16D614437CF4007A51D0 /* ShellScript */ = {
802 isa = PBXShellScriptBuildPhase;
803 buildActionMask = 2147483647;
804 files = (
805 );
806 inputPaths = (
807 );
808 outputPaths = (
809 );
810 runOnlyForDeploymentPostprocessing = 0;
811 shellPath = /bin/bash;
812 shellScript = "\nif [ -f ${SRCROOT}/U1TestFlightTeamToken.txt ]\nthen\n\ncp ${SRCROOT}/U1TestFlightTeamToken.txt ${CODESIGNING_FOLDER_PATH}\n\nelse \n\necho \"warning: ${SRCROOT}/U1TestFlightTeamToken.txt does not exist. Create this file and paste the Ubuntu One TestFlight team token into it to enable TestFlight SDK analytics.\"\n\nfi\n\n\n#echo \"foo\" > ${CODESIGNING_FOLDER_PATH}/foo.plist\n";
813 showEnvVarsInLog = 0;
814 };
780 96E860D813F7251D0026783D /* ShellScript */ = {815 96E860D813F7251D0026783D /* ShellScript */ = {
781 isa = PBXShellScriptBuildPhase;816 isa = PBXShellScriptBuildPhase;
782 buildActionMask = 2147483647;817 buildActionMask = 2147483647;
@@ -970,6 +1005,10 @@
970 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;1005 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
971 INFOPLIST_FILE = "Files/Files-Info.plist";1006 INFOPLIST_FILE = "Files/Files-Info.plist";
972 IPHONEOS_DEPLOYMENT_TARGET = 4.0;1007 IPHONEOS_DEPLOYMENT_TARGET = 4.0;
1008 LIBRARY_SEARCH_PATHS = (
1009 "$(inherited)",
1010 "\"$(SRCROOT)/Dependencies/TestFlightSDK\"",
1011 );
973 PRODUCT_NAME = "$(TARGET_NAME)";1012 PRODUCT_NAME = "$(TARGET_NAME)";
974 "PROVISIONING_PROFILE[sdk=iphoneos*]" = "";1013 "PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
975 TARGETED_DEVICE_FAMILY = 1;1014 TARGETED_DEVICE_FAMILY = 1;
@@ -988,6 +1027,10 @@
988 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;1027 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
989 INFOPLIST_FILE = "Files/Files-Info.plist";1028 INFOPLIST_FILE = "Files/Files-Info.plist";
990 IPHONEOS_DEPLOYMENT_TARGET = 4.0;1029 IPHONEOS_DEPLOYMENT_TARGET = 4.0;
1030 LIBRARY_SEARCH_PATHS = (
1031 "$(inherited)",
1032 "\"$(SRCROOT)/Dependencies/TestFlightSDK\"",
1033 );
991 PRODUCT_NAME = "$(TARGET_NAME)";1034 PRODUCT_NAME = "$(TARGET_NAME)";
992 "PROVISIONING_PROFILE[sdk=iphoneos*]" = "6B9A800B-4788-4085-B843-B668F6308C89";1035 "PROVISIONING_PROFILE[sdk=iphoneos*]" = "6B9A800B-4788-4085-B843-B668F6308C89";
993 TARGETED_DEVICE_FAMILY = 1;1036 TARGETED_DEVICE_FAMILY = 1;
9941037
=== modified file 'Files/Files-Prefix.pch'
--- Files/Files-Prefix.pch 2011-08-31 14:56:30 +0000
+++ Files/Files-Prefix.pch 2011-10-18 14:51:15 +0000
@@ -20,6 +20,9 @@
20#endif20#endif
2121
22#ifdef __OBJC__22#ifdef __OBJC__
23 #import <UIKit/UIKit.h>23
24 #import <Foundation/Foundation.h>24#import <UIKit/UIKit.h>
25#import <Foundation/Foundation.h>
26#import "TestFlight.h"
27
25#endif28#endif
2629
=== modified file 'Files/FilesAppDelegate.m'
--- Files/FilesAppDelegate.m 2011-10-12 21:02:22 +0000
+++ Files/FilesAppDelegate.m 2011-10-18 14:51:15 +0000
@@ -46,6 +46,7 @@
46- (void)ensureUploadFolder;46- (void)ensureUploadFolder;
47- (NSString*)remoteUploadFolderPath;47- (NSString*)remoteUploadFolderPath;
48- (NSString*)localUploadQueuePath;48- (NSString*)localUploadQueuePath;
49- (void)prepareTestFlight;
49@end50@end
5051
5152
@@ -68,6 +69,8 @@
6869
69- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions70- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
70{71{
72 [self prepareTestFlight];
73
71 [self.window makeKeyAndVisible];74 [self.window makeKeyAndVisible];
7275
73 return YES;76 return YES;
@@ -183,6 +186,26 @@
183 [self applicationDidBecomeActive:nil];186 [self applicationDidBecomeActive:nil];
184}187}
185188
189- (void)prepareTestFlight;
190{
191 NSString *tokenFilePath = [[NSBundle mainBundle] pathForResource:@"U1TestFlightTeamToken" ofType:@"txt"];
192 if (!tokenFilePath)
193 return;
194
195 NSError *error = nil;
196 NSString *teamToken = [NSString stringWithContentsOfFile:tokenFilePath usedEncoding:NULL error:&error];
197
198 if (teamToken)
199 {
200 teamToken = [teamToken stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
201 [TestFlight takeOff:teamToken];
202 }
203 else
204 {
205 NSLog(@"error loading TestFlight team token: %@", error);
206 }
207}
208
186209
187#pragma mark U1FolderViewControllerDelegate Methods210#pragma mark U1FolderViewControllerDelegate Methods
188211

Subscribers

People subscribed via source and target branches

to all changes: