This commit is contained in:
Chris Miles 2012-09-25 17:16:06 +10:00
commit 1e0c47667c
12 changed files with 147 additions and 54 deletions

View File

@ -35,6 +35,10 @@
#import "BITCrashReportTextFormatter.h"
#ifndef CPU_SUBTYPE_ARM_V7S
#define CPU_SUBTYPE_ARM_V7S ((cpu_subtype_t) 11) /* Swift */
#endif
/**
* Sort PLCrashReportBinaryImageInfo instances by their starting address.
*/
@ -144,6 +148,7 @@ static NSInteger binaryImageSort(id binary1, id binary2, void *context) {
switch (report.systemInfo.architecture) {
case PLCrashReportArchitectureARMv6:
case PLCrashReportArchitectureARMv7:
case PLCrashReportArchitectureARMv7s:
codeType = @"ARM";
lp64 = false;
break;
@ -386,7 +391,11 @@ static NSInteger binaryImageSort(id binary1, id binary2, void *context) {
case CPU_SUBTYPE_ARM_V7:
archName = @"armv7";
break;
case CPU_SUBTYPE_ARM_V7S:
archName = @"armv7s";
break;
default:
archName = @"arm-unknown";
break;
@ -478,6 +487,10 @@ static NSInteger binaryImageSort(id binary1, id binary2, void *context) {
archName = @"armv7";
break;
case CPU_SUBTYPE_ARM_V7S:
archName = @"armv7s";
break;
default:
archName = @"arm-unknown";
break;
@ -571,7 +584,7 @@ static NSInteger binaryImageSort(id binary1, id binary2, void *context) {
/* Make sure UTF8/16 characters are handled correctly */
NSInteger offset = 0;
NSInteger index = 0;
NSUInteger index = 0;
for (index = 0; index < [imageName length]; index++) {
NSRange range = [imageName rangeOfComposedCharacterSequenceAtIndex:index];
if (range.length > 1) {

View File

@ -51,6 +51,26 @@
@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 = ([identifier 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
@ -119,6 +139,11 @@
_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];
}
@ -202,10 +227,8 @@
}
- (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) {
@ -229,7 +252,7 @@
#endif
} 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"];
}
}

View File

@ -94,7 +94,7 @@ typedef enum {
BOOL _isAppStoreEnvironment;
BOOL _checkForUpdateOnLaunchOfBitUpdateManager;
BOOL _didSetupDidBecomeActiveNotifications;
NSString *_uuid;
}

View File

@ -77,7 +77,6 @@
@synthesize barStyle = _barStyle;
@synthesize modalPresentationStyle = _modalPresentationStyle;
#pragma mark - private
- (void)reportError:(NSError *)error {
@ -131,12 +130,23 @@
}
- (void)didBecomeActiveActions {
_checkForUpdateOnLaunchOfBitUpdateManager = YES;
if (![self isUpdateManagerDisabled]) {
[self checkExpiryDateReached];
[self startUsage];
[self checkForUpdate];
if (![self expiryDateReached]) {
[self startUsage];
if (_checkForUpdateOnLaunch) {
[self checkForUpdate];
}
}
}
}
- (void)setupDidBecomeActiveNotifications {
if (!_didSetupDidBecomeActiveNotifications) {
NSNotificationCenter *dnc = [NSNotificationCenter defaultCenter];
[dnc addObserver:self selector:@selector(didBecomeActiveActions) name:UIApplicationDidBecomeActiveNotification object:nil];
[dnc addObserver:self selector:@selector(didBecomeActiveActions) name:BITHockeyNetworkDidBecomeReachableNotification object:nil];
_didSetupDidBecomeActiveNotifications = YES;
}
}
@ -353,7 +363,7 @@
_sendUsageData = YES;
_disableUpdateManager = NO;
_checkForTracker = NO;
_checkForUpdateOnLaunchOfBitUpdateManager = NO;
_didSetupDidBecomeActiveNotifications = NO;
// set defaults
self.showDirectInstallOption = NO;
@ -389,10 +399,7 @@
[self startUsage];
NSNotificationCenter *dnc = [NSNotificationCenter defaultCenter];
[dnc addObserver:self selector:@selector(startManager) name:BITHockeyNetworkDidBecomeReachableNotification object:nil];
[dnc addObserver:self selector:@selector(stopUsage) name:UIApplicationWillTerminateNotification object:nil];
[dnc addObserver:self selector:@selector(didBecomeActiveActions) name:UIApplicationDidBecomeActiveNotification object:nil];
[dnc addObserver:self selector:@selector(stopUsage) name:UIApplicationWillResignActiveNotification object:nil];
}
return self;
@ -918,9 +925,7 @@
}
} else {
if ([self checkForTracker] || ([self isCheckForUpdateOnLaunch] && [self shouldCheckForUpdates])) {
if (!_checkForUpdateOnLaunchOfBitUpdateManager) {
[self performSelector:@selector(checkForUpdate) withObject:nil afterDelay:1.0f];
}
[self performSelector:@selector(checkForUpdate) withObject:nil afterDelay:1.0f];
}
}
} else {
@ -928,11 +933,10 @@
// if we are in the app store, make sure not to send usage information in any case for now
_sendUsageData = NO;
if (!_checkForUpdateOnLaunchOfBitUpdateManager) {
[self performSelector:@selector(checkForUpdate) withObject:nil afterDelay:1.0f];
}
[self performSelector:@selector(checkForUpdate) withObject:nil afterDelay:1.0f];
}
}
[self setupDidBecomeActiveNotifications];
}

View File

@ -1,12 +1,12 @@
Pod::Spec.new do |s|
s.name = 'HockeySDK'
s.version = '2.5.1'
s.version = '2.5.3'
s.license = 'MIT'
s.platform = :ios, '4.0'
s.summary = 'Distribute beta apps and collect crash reports with HockeyApp.'
s.homepage = 'http://hockeyapp.net/'
s.author = { 'Andreas Linde' => 'mail@andreaslinde.de', 'Thomas Dohmke' => "thomas@dohmke.de" }
s.source = { :git => 'https://github.com/bitstadium/HockeySDK-iOS.git', :tag => '2.5.1' }
s.source = { :git => 'https://github.com/bitstadium/HockeySDK-iOS.git', :tag => '2.5.3' }
s.description = 'HockeyApp is a server to distribute beta apps and collect crash reports. ' \
'It improves the testing process dramatically and can be used for both beta ' \

View File

@ -21,7 +21,7 @@ The main SDK class is `BITHockeyManager`. It initializes all modules and provide
- [Installation & Setup](http://support.hockeyapp.net/kb/client-integration/hockeyapp-for-ios-hockeysdk) (Recommended)
- [Installation & Setup Advanced](http://support.hockeyapp.net/kb/client-integration/hockeyapp-for-ios-hockeysdk-advanced) (Using Git submodule and Xcode sub-project)
- [Migration from HockeyKit & QuincyKit](http://support.hockeyapp.net/kb/how-tos/how-to-migration-from-hockeykit-quincykit)
- [Migration from HockeyKit & QuincyKit](http://support.hockeyapp.net/kb/client-integration/migrate-from-hockeykit-quincykit-to-hockeysdk-for-ios)
- [Mac Desktop Uploader](http://support.hockeyapp.net/kb/how-tos/how-to-upload-to-hockeyapp-on-a-mac)
@ -38,6 +38,29 @@ This documentation provides integrated help in Xcode for all public APIs and a s
## Changelog
### Version 2.5.3
- General:
- Fix checking validity of live identifier not working correctly
### Version 2.5.2
- General:
- Declared as final release, since everything in 2.5.2b2 is working as expected
### Version 2.5.2b2
- General:
- [NEW] Added support for armv7s architecture
- Updating:
- [BUGFIX] Fix update checks not done when the app becomes active again
### Version 2.5.2b1
- General:

View File

@ -879,7 +879,6 @@
1E59547A15B6C41300A03429 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
DSTROOT = /tmp/HockeySDK.dst;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@ -894,7 +893,6 @@
1E59547B15B6C41300A03429 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
DSTROOT = /tmp/HockeySDK.dst;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@ -988,10 +986,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;
@ -1023,10 +1018,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;
@ -1053,10 +1045,6 @@
E400563F148D79B500EB22B9 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = (
armv6,
armv7,
);
DSTROOT = /tmp/HockeySDK.dst;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@ -1072,10 +1060,6 @@
E4005640148D79B500EB22B9 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = (
armv6,
armv7,
);
DSTROOT = /tmp/HockeySDK.dst;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",

View File

@ -1,3 +1,3 @@
BUILD_NUMBER = 3
VERSION_STRING = 2.5.2b1
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) BITHOCKEY_VERSION="@\"2.5.2b1\""
BUILD_NUMBER = 5
VERSION_STRING = 2.5.3
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) BITHOCKEY_VERSION="@\"2.5.3\""

View File

@ -87,8 +87,11 @@ typedef enum {
/** ARMv7 */
PLCrashReportArchitectureARMv7 = 5,
/** ARMv7s */
PLCrashReportArchitectureARMv7s = 6,
/** Unknown */
PLCrashReportArchitectureUnknown = 6
PLCrashReportArchitectureUnknown = 7
} PLCrashReportArchitecture;

View File

@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>12A269</string>
<string>12B19</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
@ -19,20 +19,20 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.2-beta1</string>
<string>1.2-beta2</string>
<key>DTCompiler</key>
<string></string>
<key>DTPlatformBuild</key>
<string>4F1003</string>
<string>4G182</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>12A264</string>
<string>12C37</string>
<key>DTSDKName</key>
<string>macosx10.8</string>
<key>DTXcode</key>
<string>0441</string>
<string>0450</string>
<key>DTXcodeBuild</key>
<string>4F1003</string>
<string>4G182</string>
</dict>
</plist>

View File

@ -1,3 +1,46 @@
### Version 2.5.3
- General:
- Fix checking validity of live identifier not working correctly
### Version 2.5.2
- General:
- Declared as final release, since everything in 2.5.2b2 is working as expected
### Version 2.5.2b2
- General:
- [NEW] Added support for armv7s architecture
- Updating:
- [BUGFIX] Fix update checks not done when the app becomes active again
### Version 2.5.2b1
- General:
- [NEW] Replace categories with C functions, so the `Other Linker Flag` `-ObjC` and `-all_load` won't not be needed for integration
- [BUGFIX] Some code style fixes and missing new lines in headers at EOF
- Crash Reporting:
- [NEW] PLCrashReporter framework now linked into the HockeySDK framework, so that won't be needed to be added separately any more
- [NEW] Add some error handler detection to optionally notify the developer of multiple handlers that could cause crashes not to be reported to HockeyApp
- [NEW] Show an error in the console if an older version of PLCrashReporter is linked
- [NEW] Make sure the app doesn't crash if the developer forgot to delete the old PLCrashReporter version and the framework search path is still pointing to it
- Updating:
- [BUGFIX] Fix disabling usage tracking and expiry check not working if `checkForUpdateOnLaunch` is set to NO
- [BUGFIX] `disableUpdateManager` wasn't working correctly
- [BUGFIX] If the server doesn't return any app versions, don't handle this as an error, but show a warning in the console when `debugLogging` is enabled
## Version 2.5.1
- General: