Skip to content

Commit fd639d3

Browse files
author
Mattes Groeger
committed
Integrate HockeySDK
1 parent 878f1c0 commit fd639d3

File tree

5 files changed

+18
-2
lines changed

5 files changed

+18
-2
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ before_script:
77
- ./scripts/add-key.sh
88
- ./scripts/update-bundle.sh
99
script:
10-
- xctool -workspace TravisExample.xcworkspace -scheme TravisExample -sdk iphoneos -configuration Release OBJROOT=$PWD/build SYMROOT=$PWD/build ONLY_ACTIVE_ARCH=NO TESTFLIGHT_APP_TOKEN=$TESTFLIGHT_APP_TOKEN
10+
- xctool -workspace TravisExample.xcworkspace -scheme TravisExample -sdk iphoneos -configuration Release OBJROOT=$PWD/build SYMROOT=$PWD/build ONLY_ACTIVE_ARCH=NO TESTFLIGHT_APP_TOKEN=$TESTFLIGHT_APP_TOKEN HOCKEY_APP_ID=$HOCKEY_APP_ID
1111
- xctool test -workspace TravisExample.xcworkspace -scheme TravisExampleTests -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO
1212
after_script:
1313
- ./scripts/remove-key.sh

Podfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
platform :ios, '5.0'
22

33
pod 'TestFlightSDK', '~> 2.0.2'
4+
pod 'HockeySDK', '~> 3.5.0-rc3'
45

56
target :TravisExampleTests, :exclusive => false do
67
pod 'Kiwi'

TravisExample.xcodeproj/project.pbxproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@
474474
buildSettings = {
475475
GCC_PRECOMPILE_PREFIX_HEADER = YES;
476476
GCC_PREFIX_HEADER = "TravisExample/TravisExample-Prefix.pch";
477+
HOCKEY_APP_ID = "";
477478
INFOPLIST_FILE = "TravisExample/TravisExample-Info.plist";
478479
PRODUCT_NAME = "$(TARGET_NAME)";
479480
TESTFLIGHT_APP_TOKEN = "";
@@ -495,7 +496,9 @@
495496
"RELEASE=1",
496497
"COCOAPODS=1",
497498
"TESTFLIGHT_APP_TOKEN=$(TESTFLIGHT_APP_TOKEN)",
499+
"HOCKEY_APP_ID=$(HOCKEY_APP_ID)",
498500
);
501+
HOCKEY_APP_ID = "";
499502
INFOPLIST_FILE = "TravisExample/TravisExample-Info.plist";
500503
PRODUCT_NAME = "$(TARGET_NAME)";
501504
PROVISIONING_PROFILE = "";

TravisExample/AppDelegate.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
//
88

99
#import <UIKit/UIKit.h>
10+
#import "BITHockeyManagerDelegate.h"
1011

11-
@interface AppDelegate : UIResponder <UIApplicationDelegate>
12+
@interface AppDelegate : UIResponder <UIApplicationDelegate, BITHockeyManagerDelegate>
1213

1314
@property (strong, nonatomic) UIWindow *window;
1415

TravisExample/AppDelegate.m

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
#import "AppDelegate.h"
1010
#import "TestFlight.h"
11+
#import "BITHockeyManager.h"
12+
#import "BITCrashManager.h"
1113

1214
#define NSStringize_helper(x) #x
1315
#define NSStringize(x) @NSStringize_helper(x)
@@ -17,7 +19,16 @@ @implementation AppDelegate
1719
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
1820
{
1921
#ifdef RELEASE
22+
// Initialize TestFlight
2023
[TestFlight takeOff:NSStringize(TESTFLIGHT_APP_TOKEN)];
24+
25+
// Initialize HockeyApp
26+
NSString *hockeyAppIdentifier = NSStringize(HOCKEY_APP_ID);
27+
[[BITHockeyManager sharedHockeyManager] configureWithBetaIdentifier:hockeyAppIdentifier
28+
liveIdentifier:hockeyAppIdentifier
29+
delegate:self];
30+
[[BITHockeyManager sharedHockeyManager] crashManager].delegate = self;
31+
[[BITHockeyManager sharedHockeyManager] startManager];
2132
#endif
2233
return YES;
2334
}

0 commit comments

Comments
 (0)