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.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
DerAndereAndi committed Aug 14, 2012
2 parents 700daf7 + 11eaba1 commit b44f287
Show file tree
Hide file tree
Showing 9 changed files with 91 additions and 43 deletions.
1 change: 1 addition & 0 deletions Classes/BITCrashManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ static NSString *kBITCrashManagerStatus = @"BITCrashManagerStatus";
NSURLConnection *_urlConnection;

BOOL _sendingInProgress;
BOOL _isSetup;
}


Expand Down
36 changes: 24 additions & 12 deletions Classes/BITCrashManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ - (id)initWithAppIdentifier:(NSString *)appIdentifier {

_delegate = nil;
_showAlwaysButton = NO;
_isSetup = NO;

_crashIdenticalCurrentVersion = YES;
_urlConnection = nil;
Expand Down Expand Up @@ -117,7 +118,7 @@ - (id)initWithAppIdentifier:(NSString *)appIdentifier {
[_fileManager removeItemAtPath:_analyzerInProgressFile error:&error];
}

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(startManager) name:BITHockeyNetworkDidBecomeReachableNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(invokeDelayedProcessing) name:BITHockeyNetworkDidBecomeReachableNotification object:nil];

if (!BITHockeyBundle()) {
NSLog(@"WARNING: %@ is missing, will send reports automatically!", BITHOCKEYSDK_BUNDLE);
Expand Down Expand Up @@ -422,18 +423,29 @@ - (void)invokeDelayedProcessing {
- (void)startManager {
if (_crashManagerStatus == BITCrashManagerStatusDisabled) return;

PLCrashReporter *crashReporter = [PLCrashReporter sharedReporter];
NSError *error = NULL;

// Check if we previously crashed
if ([crashReporter hasPendingCrashReport]) {
_didCrashInLastSession = YES;
[self handleCrashReport];
if (!_isSetup) {
PLCrashReporter *crashReporter = [PLCrashReporter sharedReporter];
NSError *error = NULL;

// Check if we previously crashed
if ([crashReporter hasPendingCrashReport]) {
_didCrashInLastSession = YES;
[self handleCrashReport];
}

// PLCrashReporter is throwing an NSException if it is being enabled again
// even though it already is enabled
@try {
// Enable the Crash Reporter
if (![crashReporter enableCrashReporterAndReturnError: &error])
NSLog(@"WARNING: Could not enable crash reporter: %@", [error localizedDescription]);
}
@catch (NSException * e) {
NSLog(@"WARNING: %@", [e reason]);
}

_isSetup = YES;
}

// Enable the Crash Reporter
if (![crashReporter enableCrashReporterAndReturnError: &error])
NSLog(@"WARNING: Could not enable crash reporter: %@", [error localizedDescription]);

[self performSelector:@selector(invokeDelayedProcessing) withObject:nil afterDelay:0.5];
}
Expand Down
12 changes: 6 additions & 6 deletions Classes/BITHockeyManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

@interface BITHockeyManager ()

- (BOOL)shouldUseLiveIdenfitier;
- (BOOL)shouldUseLiveIdentifier;

- (void)configureJMC;

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

if ([self shouldUseLiveIdenfitier]) {
if ([self shouldUseLiveIdentifier]) {
_appIdentifier = [liveIdentifier copy];
}
else {
Expand Down Expand Up @@ -178,10 +178,10 @@ - (void)setUpdateURL:(NSString *)anUpdateURL {

#pragma mark - Private Instance Methods

- (BOOL)shouldUseLiveIdenfitier {
- (BOOL)shouldUseLiveIdentifier {
BOOL delegateResult = NO;
if ([_delegate respondsToSelector:@selector(shouldUseLiveIdenfitier)]) {
delegateResult = [(NSObject <BITHockeyManagerDelegate>*)_delegate shouldUseLiveIdenfitier];
if ([_delegate respondsToSelector:@selector(shouldUseLiveIdentifier)]) {
delegateResult = [(NSObject <BITHockeyManagerDelegate>*)_delegate shouldUseLiveIdentifier];
}

return (delegateResult) || (_appStoreEnvironment);
Expand All @@ -201,7 +201,7 @@ - (void)initializeModules {

BITHockeyLog(@"Setup UpdateManager");
_updateManager = [[BITUpdateManager alloc] initWithAppIdentifier:_appIdentifier isAppStoreEnvironemt:_appStoreEnvironment];
_crashManager.delegate = _delegate;
_updateManager.delegate = _delegate;

// Only if JMC is part of the project
if ([[self class] isJMCPresent]) {
Expand Down
4 changes: 2 additions & 2 deletions Classes/BITHockeyManagerDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@
the App Store.
Example:
- (BOOL)shouldUseLiveIdenfitier {
- (BOOL)shouldUseLiveIdentifier {
#ifdef (CONFIGURATION_Release)
return YES;
#endif
return NO;
}
*/
- (BOOL)shouldUseLiveIdenfitier;
- (BOOL)shouldUseLiveIdentifier;

@end
43 changes: 24 additions & 19 deletions HockeySDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,35 @@ Pod::Spec.new do |s|
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', :tag => '2.5.0' }
s.source = { :git => 'https://github.com/bitstadium/HockeySDK-iOS.git', :tag => '2.5.1' }

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 ' \
'and App Store builds. Only beta builds will notify users about a new version ' \
'NOTE: You will need to add a dependency on JSONKit, SBJson or YAJL yourself. If you ' \
'want the framework to try again when a network is available, add a dependency ' \
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 ' \
'and App Store builds. Only beta builds will notify users about a new version ' \
'NOTE: You will need to add a dependency on JSONKit, SBJson or YAJL yourself. If you ' \
'want the framework to try again when a network is available, add a dependency ' \
'on Reachability and send a notification with the name `BITHockeyNetworkDidBecomeReachable` ' \
'yourself when the network becomse reachable.'

s.source_files = 'Classes'
s.requires_arc = false
s.resources = 'Resources/HockeySDKResources.bundle'
s.frameworks = 'QuartzCore', 'SystemConfiguration', 'CrashReporter', 'CoreGraphics.framework', 'UIKit.framework'
s.xcconfig = { 'FRAMEWORK_SEARCH_PATHS' => '"$(BUILT_PRODUCTS_DIR)/Pods/Frameworks"' }
s.preserve_paths = 'Resources', 'Support', 'Vendor'
s.frameworks = 'QuartzCore', 'SystemConfiguration', 'CrashReporter', 'CoreGraphics', 'UIKit'
s.xcconfig = { 'FRAMEWORK_SEARCH_PATHS' => '"$(PODS_ROOT)/HockeySDK/Vendor"',
'GCC_PREPROCESSOR_DEFINITIONS' => %{BITHOCKEY_VERSION="@\\"#{s.version}\\""} }

def s.post_install(target_installer)
# Add a copy build phase and make it copy the CrashReporter.framework to the shared BUILT_PRODUCTS_DIR,
# so that both the Pods project and the user's project will pick it up.
phase = target_installer.target.buildPhases.add(Xcodeproj::Project::PBXCopyFilesBuildPhase, 'dstPath' => 'Pods/Frameworks')
file = target_installer.project.main_group.files.new('path' => 'HockeySDK/Vendor/CrashReporter.framework')
phase.files << file.buildFiles.new
phases = target_installer.target.attributes['buildPhases']
phases.delete(phase.uuid)
phases.insert(1, phase.uuid)
end
end
puts "\nGenerating HockeySDK resources bundle\n".yellow if config.verbose?
Dir.chdir File.join(config.project_pods_root, 'HockeySDK/Support') do
command = "xcodebuild -project HockeySDK.xcodeproj -target HockeySDKResources CONFIGURATION_BUILD_DIR=../Resources"
command << " 2>&1 > /dev/null" unless config.verbose?
unless system(command)
raise ::Pod::Informative, "Failed to generate HockeySDK resources bundle"
end
end
File.open(File.join(config.project_pods_root, target_installer.target_definition.copy_resources_script_name), 'a') do |file|
file.puts "install_resource 'HockeySDK/Resources/HockeySDKResources.bundle'"
end
end
end

14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,19 @@ This documentation provides integrated help in Xcode for all public APIs and a s

## Changelog

### Version 2.5
### Version 2.5.1

- General:

- [BUGFIX] Typo in delegate `shouldUseLiveIdentifier` of `BITHockeyManagerDelegate`
- [BUGFIX] Default updateManager delegate wasn't set

- Crash Reporting:

- [BUGFIX] Crash when developer sends the notification `BITHockeyNetworkDidBecomeReachableNotification`


### Version 2.5.0

- General:

Expand Down
6 changes: 3 additions & 3 deletions Support/buildnumber.xcconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
BUILD_NUMBER = 1
VERSION_STRING = 2.5.0
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) BITHOCKEY_VERSION="@\"2.5.0\""
BUILD_NUMBER = 2
VERSION_STRING = 2.5.1
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) BITHOCKEY_VERSION="@\"2.5.1\""
12 changes: 12 additions & 0 deletions docs/Changelog-template.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## Version 2.5.1

- General:

- [BUGFIX] Typo in delegate `shouldUseLiveIdentifier` of `BITHockeyManagerDelegate`
- [BUGFIX] Default updateManager delegate wasn't set

- Crash Reporting:

- [BUGFIX] Crash when developer sends the notification `BITHockeyNetworkDidBecomeReachableNotification`


## Version 2.5

- General:
Expand Down
6 changes: 6 additions & 0 deletions docs/Guide-Migration-Kits-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ Now follow the steps described in our [setup guide](http://support.hockeyapp.net

After you have finished the setup guide make sure everything works as expected and then delete the out commented lines from above.

## Troubleshooting

### ld: warning: directory not found for option '....QuincyKit.....'

This warning means there is still a `Framework Search Path` pointing to the folder of the old SDK. Open the `Project Navigator` (⌘+1) and go to the tab `Build Settings`. In the search field enter the name of the folder mentioned in the warning (for example "QuincyKit") . If the search finds something in `Framework Search Paths` you should double click that entry and remove the line which points to the old folder.

## Advanced Migration

If you used any optional API calls, for example adding a custom description to a crash report, migrating those would exceed the scope of this guide. Please have a look at the [API documentation](https://github.com/bitstadium/HockeySDK-iOS/downloads).

0 comments on commit b44f287

Please sign in to comment.