Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

Commit

Permalink
Merge branch 'release/2.5.2'
Browse files Browse the repository at this point in the history
Conflicts:
	README.md
  • Loading branch information
DerAndereAndi committed Sep 21, 2012
2 parents 5d5b1d0 + c5a5ece commit c87abff
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 19 deletions.
33 changes: 28 additions & 5 deletions Classes/BITHockeyManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,26 @@ @implementation BITHockeyManager

@synthesize appStoreEnvironment = _appStoreEnvironment;

#pragma mark - Private Class Methods

- (BOOL)checkValidityOfAppIdentifier:(NSString *)identifier {
BOOL result = NO;

if (identifier) {
NSCharacterSet *hexSet = [NSCharacterSet characterSetWithCharactersInString:@"0123456789abcdef"];
NSCharacterSet *inStringSet = [NSCharacterSet characterSetWithCharactersInString:identifier];
result = ([_appIdentifier length] == 32) && ([hexSet isSupersetOfSet:inStringSet]);
}

return result;
}

- (void)logInvalidIdentifier:(NSString *)environment {
if (!_appStoreEnvironment) {
NSLog(@"[HockeySDK] ERROR: The %@ is invalid! Please use the HockeyApp app identifier you find on the apps website on HockeyApp! The SDK is disabled!", environment);
}
}


#pragma mark - Public Class Methods

Expand Down Expand Up @@ -117,6 +137,11 @@ - (void)configureWithBetaIdentifier:(NSString *)betaIdentifier liveIdentifier:(N
_delegate = delegate;
[_appIdentifier release];

// check the live identifier now, because otherwise invalid identifier would only be logged when the app is already in the store
if (![self checkValidityOfAppIdentifier:liveIdentifier]) {
[self logInvalidIdentifier:@"liveIdentifier"];
}

if ([self shouldUseLiveIdentifier]) {
_appIdentifier = [liveIdentifier copy];
}
Expand Down Expand Up @@ -196,10 +221,8 @@ - (BOOL)shouldUseLiveIdentifier {
}

- (void)initializeModules {
NSCharacterSet *hexSet = [NSCharacterSet characterSetWithCharactersInString:@"0123456789abcdef"];
NSCharacterSet *inStringSet = [NSCharacterSet characterSetWithCharactersInString:_appIdentifier];
_validAppIdentifier = ([_appIdentifier length] == 32) && ([hexSet isSupersetOfSet:inStringSet]);

_validAppIdentifier = [self checkValidityOfAppIdentifier:_appIdentifier];

_startManagerIsInvoked = NO;

if (_validAppIdentifier) {
Expand All @@ -221,7 +244,7 @@ - (void)initializeModules {
}

} else {
NSLog(@"[HockeySDK] ERROR: The app identifier is invalid! Please use the HockeyApp app identifier you find on the apps website on HockeyApp! The SDK is disabled!");
[self logInvalidIdentifier:@"app identifier"];
}
}

Expand Down
16 changes: 2 additions & 14 deletions Support/HockeySDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,6 @@
1E59547A15B6C41300A03429 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
DSTROOT = /tmp/HockeySDK.dst;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -894,7 +893,6 @@
1E59547B15B6C41300A03429 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
DSTROOT = /tmp/HockeySDK.dst;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -909,7 +907,6 @@
1E5954F015B6F24A00A03429 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
DSTROOT = /tmp/HockeySDK.dst;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -924,7 +921,6 @@
1E5954F115B6F24A00A03429 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
DSTROOT = /tmp/HockeySDK.dst;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -980,10 +976,7 @@
baseConfigurationReference = 1E66CA9115D4100500F35BED /* buildnumber.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = (
armv7,
armv6,
);
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
Expand Down Expand Up @@ -1015,10 +1008,7 @@
baseConfigurationReference = 1E66CA9115D4100500F35BED /* buildnumber.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = (
armv7,
armv6,
);
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
Expand All @@ -1045,7 +1035,6 @@
E400563F148D79B500EB22B9 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
DSTROOT = /tmp/HockeySDK.dst;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -1061,7 +1050,6 @@
E4005640148D79B500EB22B9 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
DSTROOT = /tmp/HockeySDK.dst;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down

0 comments on commit c87abff

Please sign in to comment.