diff --git a/Classes/BITCrashReportTextFormatter.m b/Classes/BITCrashReportTextFormatter.m index 1bc7e09277..3d13b519ea 100644 --- a/Classes/BITCrashReportTextFormatter.m +++ b/Classes/BITCrashReportTextFormatter.m @@ -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) { diff --git a/Classes/BITHockeyManager.m b/Classes/BITHockeyManager.m index 0fb68521b9..0d01ea07a1 100644 --- a/Classes/BITHockeyManager.m +++ b/Classes/BITHockeyManager.m @@ -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"]; } } diff --git a/Classes/BITUpdateManager.h b/Classes/BITUpdateManager.h index be01e1a2b2..ae402efcb5 100644 --- a/Classes/BITUpdateManager.h +++ b/Classes/BITUpdateManager.h @@ -94,7 +94,7 @@ typedef enum { BOOL _isAppStoreEnvironment; - BOOL _checkForUpdateOnLaunchOfBitUpdateManager; + BOOL _didSetupDidBecomeActiveNotifications; NSString *_uuid; } diff --git a/Classes/BITUpdateManager.m b/Classes/BITUpdateManager.m index 7f9b0a4ab4..5ea1832450 100644 --- a/Classes/BITUpdateManager.m +++ b/Classes/BITUpdateManager.m @@ -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]; } diff --git a/HockeySDK.podspec b/HockeySDK.podspec index 3f82f15354..5c9ea3df8e 100644 --- a/HockeySDK.podspec +++ b/HockeySDK.podspec @@ -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 ' \ diff --git a/README.md b/README.md index 7bd92e8ae5..2da1fa8bff 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/Support/HockeySDK.xcodeproj/project.pbxproj b/Support/HockeySDK.xcodeproj/project.pbxproj index b4f5807f0c..9009b55c32 100644 --- a/Support/HockeySDK.xcodeproj/project.pbxproj +++ b/Support/HockeySDK.xcodeproj/project.pbxproj @@ -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)", diff --git a/Support/buildnumber.xcconfig b/Support/buildnumber.xcconfig index 002caa4a62..578f418940 100644 --- a/Support/buildnumber.xcconfig +++ b/Support/buildnumber.xcconfig @@ -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\"" diff --git a/Vendor/CrashReporter.framework/Versions/A/CrashReporter b/Vendor/CrashReporter.framework/Versions/A/CrashReporter index d155806f7a..d0e903830b 100644 Binary files a/Vendor/CrashReporter.framework/Versions/A/CrashReporter and b/Vendor/CrashReporter.framework/Versions/A/CrashReporter differ diff --git a/Vendor/CrashReporter.framework/Versions/A/Headers/PLCrashReportSystemInfo.h b/Vendor/CrashReporter.framework/Versions/A/Headers/PLCrashReportSystemInfo.h index 70167dfcfe..3dbcb72286 100644 --- a/Vendor/CrashReporter.framework/Versions/A/Headers/PLCrashReportSystemInfo.h +++ b/Vendor/CrashReporter.framework/Versions/A/Headers/PLCrashReportSystemInfo.h @@ -87,8 +87,11 @@ typedef enum { /** ARMv7 */ PLCrashReportArchitectureARMv7 = 5, + /** ARMv7s */ + PLCrashReportArchitectureARMv7s = 6, + /** Unknown */ - PLCrashReportArchitectureUnknown = 6 + PLCrashReportArchitectureUnknown = 7 } PLCrashReportArchitecture; diff --git a/Vendor/CrashReporter.framework/Versions/A/Resources/Info.plist b/Vendor/CrashReporter.framework/Versions/A/Resources/Info.plist index 78a236a112..ee842c6ad8 100644 --- a/Vendor/CrashReporter.framework/Versions/A/Resources/Info.plist +++ b/Vendor/CrashReporter.framework/Versions/A/Resources/Info.plist @@ -3,7 +3,7 @@ BuildMachineOSBuild - 12A269 + 12B19 CFBundleDevelopmentRegion English CFBundleExecutable @@ -19,20 +19,20 @@ CFBundleSignature ???? CFBundleVersion - 1.2-beta1 + 1.2-beta2 DTCompiler DTPlatformBuild - 4F1003 + 4G182 DTPlatformVersion GM DTSDKBuild - 12A264 + 12C37 DTSDKName macosx10.8 DTXcode - 0441 + 0450 DTXcodeBuild - 4F1003 + 4G182 diff --git a/docs/Changelog-template.md b/docs/Changelog-template.md index a1b61c981d..b44f0182a8 100644 --- a/docs/Changelog-template.md +++ b/docs/Changelog-template.md @@ -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: