Merge branch 'release/2.2.3'

* release/2.2.3:
  Update copyright years in license file
  Update PLCrashReporter with UTF bug fix
  Clean crash queue if the HockeyApp server rejected the crash
  Fix a problem with dismissing the update view in some scenarios
  Fix memory issue
This commit is contained in:
Andreas Linde 2012-02-05 22:08:30 +01:00
commit b9064d9136
7 changed files with 22 additions and 12 deletions

View File

@ -398,11 +398,11 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain";
// we did write something else in the past, so for compatibility reasons do this // we did write something else in the past, so for compatibility reasons do this
id tempLastCheck = [[NSUserDefaults standardUserDefaults] objectForKey:kDateOfLastHockeyCheck]; id tempLastCheck = [[NSUserDefaults standardUserDefaults] objectForKey:kDateOfLastHockeyCheck];
if ([tempLastCheck isKindOfClass:[NSDate class]]) { if ([tempLastCheck isKindOfClass:[NSDate class]]) {
lastCheck_ = tempLastCheck; self.lastCheck = tempLastCheck;
} }
} }
if (!lastCheck_) { if (!lastCheck_) {
lastCheck_ = [NSDate distantPast]; self.lastCheck = [NSDate distantPast];
} }
if ([[NSUserDefaults standardUserDefaults] objectForKey:kHockeyAllowUserSetting]) { if ([[NSUserDefaults standardUserDefaults] objectForKey:kHockeyAllowUserSetting]) {
@ -522,11 +522,14 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain";
navController_.modalPresentationStyle = UIModalPresentationFormSheet; navController_.modalPresentationStyle = UIModalPresentationFormSheet;
} }
hockeyViewController.modalAnimated = YES;
[parentViewController presentModalViewController:navController_ animated:YES]; [parentViewController presentModalViewController:navController_ animated:YES];
} else { } else {
// if not, we add a subview to the window. A bit hacky but should work in most circumstances. // if not, we add a subview to the window. A bit hacky but should work in most circumstances.
// Also, we don't get a nice animation for free, but hey, this is for beta not production users ;) // Also, we don't get a nice animation for free, but hey, this is for beta not production users ;)
BWHockeyLog(@"No rootViewController found, using UIWindow-approach: %@", visibleWindow); BWHockeyLog(@"No rootViewController found, using UIWindow-approach: %@", visibleWindow);
hockeyViewController.modalAnimated = NO;
[visibleWindow addSubview:navController_.view]; [visibleWindow addSubview:navController_.view];
} }
} }

View File

@ -44,6 +44,7 @@ typedef enum {
NSDictionary *cellLayout; NSDictionary *cellLayout;
BOOL modal_; BOOL modal_;
BOOL modalAnimated_;
BOOL kvoRegistered_; BOOL kvoRegistered_;
BOOL showAllVersions_; BOOL showAllVersions_;
UIStatusBarStyle statusBarStyle_; UIStatusBarStyle statusBarStyle_;
@ -59,6 +60,7 @@ typedef enum {
@property (nonatomic, retain) BWHockeyManager *hockeyManager; @property (nonatomic, retain) BWHockeyManager *hockeyManager;
@property (nonatomic, readwrite) BOOL modal; @property (nonatomic, readwrite) BOOL modal;
@property (nonatomic, readwrite) BOOL modalAnimated;
- (id)init:(BWHockeyManager *)newHockeyManager modal:(BOOL)newModal; - (id)init:(BWHockeyManager *)newHockeyManager modal:(BOOL)newModal;
- (id)init; - (id)init;

View File

@ -50,6 +50,7 @@
@synthesize appStoreButtonState = appStoreButtonState_; @synthesize appStoreButtonState = appStoreButtonState_;
@synthesize hockeyManager = hockeyManager_; @synthesize hockeyManager = hockeyManager_;
@synthesize modal = modal_; @synthesize modal = modal_;
@synthesize modalAnimated = modalAnimated_;
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
#pragma mark - #pragma mark -
@ -234,6 +235,7 @@
if ((self = [super initWithStyle:UITableViewStylePlain])) { if ((self = [super initWithStyle:UITableViewStylePlain])) {
self.hockeyManager = newHockeyManager; self.hockeyManager = newHockeyManager;
self.modal = newModal; self.modal = newModal;
self.modalAnimated = YES;
self.title = BWHockeyLocalize(@"HockeyUpdateScreenTitle"); self.title = BWHockeyLocalize(@"HockeyUpdateScreenTitle");
if ([self.hockeyManager shouldShowUserSettings]) { if ([self.hockeyManager shouldShowUserSettings]) {
@ -280,7 +282,7 @@
} }
// If there is no presenting view controller just remove view // If there is no presenting view controller just remove view
if (presentingViewController) { if (presentingViewController && self.modalAnimated) {
[presentingViewController dismissModalViewControllerAnimated:YES]; [presentingViewController dismissModalViewControllerAnimated:YES];
} }
else { else {

View File

@ -730,6 +730,9 @@ NSString *BWQuincyLocalize(NSString *stringToken) {
[self showCrashStatusMessage]; [self showCrashStatusMessage];
} }
} }
} else if (_statusCode == 400 && self.appIdentifier) {
[self _cleanCrashReports];
BWQuincyLog(@"ERROR: The server rejected receiving crash reports for this app version!");
} else { } else {
if (_responseData == nil || [_responseData length] == 0) { if (_responseData == nil || [_responseData length] == 0) {
BWQuincyLog(@"ERROR: Sending failed with an empty response!"); BWQuincyLog(@"ERROR: Sending failed with an empty response!");

View File

@ -14,7 +14,7 @@ Thomas Dohmke <thomas@dohmke.de>
The Hockey SDK is provided under the following license: The Hockey SDK is provided under the following license:
The MIT License The MIT License
Copyright (c) 2011 Codenauts UG (haftungsbeschränkt). All rights reserved. Copyright (c) 2011-2012 Codenauts UG (haftungsbeschränkt). All rights reserved.
Permission is hereby granted, free of charge, to any person Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation obtaining a copy of this software and associated documentation
@ -40,7 +40,7 @@ The Hockey SDK is provided under the following license:
Except as noted below, PLCrashReporter Except as noted below, PLCrashReporter
is provided under the following license: is provided under the following license:
Copyright (c) 2008 - 2009 Plausible Labs Cooperative, Inc. Copyright (c) 2008 - 2012 Plausible Labs Cooperative, Inc.
All rights reserved. All rights reserved.
Permission is hereby granted, free of charge, to any person Permission is hereby granted, free of charge, to any person

View File

@ -3,7 +3,7 @@
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>BuildMachineOSBuild</key> <key>BuildMachineOSBuild</key>
<string>10K549</string> <string>11D50</string>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>English</string> <string>English</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
@ -21,18 +21,18 @@
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1.0</string> <string>1.0</string>
<key>DTCompiler</key> <key>DTCompiler</key>
<string></string> <string>com.apple.compilers.llvmgcc42</string>
<key>DTPlatformBuild</key> <key>DTPlatformBuild</key>
<string>4A2002a</string> <string>4D502</string>
<key>DTPlatformVersion</key> <key>DTPlatformVersion</key>
<string>GM</string> <string>GM</string>
<key>DTSDKBuild</key> <key>DTSDKBuild</key>
<string>4A2002a</string> <string>11C63</string>
<key>DTSDKName</key> <key>DTSDKName</key>
<string>macosx10.6</string> <string>macosx10.7</string>
<key>DTXcode</key> <key>DTXcode</key>
<string>0402</string> <string>0421</string>
<key>DTXcodeBuild</key> <key>DTXcodeBuild</key>
<string>4A2002a</string> <string>4D502</string>
</dict> </dict>
</plist> </plist>