Merged changes from QuincyKit repo.

This commit is contained in:
Thomas Dohmke 2011-12-03 15:31:36 +01:00
parent 0e905a011b
commit bc7d538ed6
5 changed files with 20 additions and 19 deletions

View File

@ -505,10 +505,11 @@ NSString *BWQuincyLocalize(NSString *stringToken) {
[self _getDevicePlatform],
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"],
report.applicationInfo.applicationVersion,
crashLogString,
[crashLogString stringByReplacingOccurrencesOfString:@"]]>" withString:@"]]" @"]]><![CDATA[" @">" options:NSLiteralSearch range:NSMakeRange(0,crashLogString.length)],
userid,
contact,
description];
[description stringByReplacingOccurrencesOfString:@"]]>" withString:@"]]" @"]]><![CDATA[" @">" options:NSLiteralSearch range:NSMakeRange(0,description.length)]];
// store this crash report as user approved, so if it fails it will retry automatically
[approvedCrashReports setObject:[NSNumber numberWithBool:YES] forKey:[_crashFiles objectAtIndex:i]];
@ -656,6 +657,7 @@ NSString *BWQuincyLocalize(NSString *stringToken) {
if (_statusCode >= 200 && _statusCode < 400) {
[self _cleanCrashReports];
_feedbackRequestID = nil;
if (self.appIdentifier) {
// HockeyApp uses PList XML format
NSMutableDictionary *response = [NSPropertyListSerialization propertyListFromData:_responseData
@ -663,10 +665,12 @@ NSString *BWQuincyLocalize(NSString *stringToken) {
format:nil
errorDescription:NULL];
_serverResult = (CrashReportStatus)[[response objectForKey:@"status"] intValue];
if ([response objectForKey:@"id"]) {
_feedbackRequestID = [[NSString alloc] initWithString:[response objectForKey:@"id"]];
_feedbackDelayInterval = [[response objectForKey:@"delay"] floatValue];
if (_feedbackDelayInterval > 0)
_feedbackDelayInterval *= 0.01;
}
} else {
NSXMLParser *parser = [[NSXMLParser alloc] initWithData:_responseData];
// Set self as the delegate of the parser so that it will receive the parser delegate methods callbacks.
@ -682,15 +686,12 @@ NSString *BWQuincyLocalize(NSString *stringToken) {
}
if ([self isFeedbackActivated]) {
if (self.appIdentifier) {
// only proceed if the server did not report any problem
if (_serverResult == CrashReportStatusQueued) {
if ((self.appIdentifier) && (_serverResult == CrashReportStatusQueued)) {
// the report is still in the queue
if (_feedbackRequestID) {
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(_checkForFeedbackStatus) object:nil];
[self performSelector:@selector(_checkForFeedbackStatus) withObject:nil afterDelay:_feedbackDelayInterval];
} else {
// we do have a status, show it if needed
[self showCrashStatusMessage];
}
} else {
[self showCrashStatusMessage];

Binary file not shown.

Binary file not shown.

View File

@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>11C74</string>
<string>10K549</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
@ -23,16 +23,16 @@
<key>DTCompiler</key>
<string></string>
<key>DTPlatformBuild</key>
<string>4D199</string>
<string>4A2002a</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>11C63</string>
<string>4A2002a</string>
<key>DTSDKName</key>
<string>macosx10.7</string>
<string>macosx10.6</string>
<key>DTXcode</key>
<string>0420</string>
<string>0402</string>
<key>DTXcodeBuild</key>
<string>4D199</string>
<string>4A2002a</string>
</dict>
</plist>