diff options
author | Mikkel Krautz <mikkel@krautz.dk> | 2010-09-05 23:10:33 +0400 |
---|---|---|
committer | Mikkel Krautz <mikkel@krautz.dk> | 2010-09-05 23:10:33 +0400 |
commit | 062676db40549203ebb8310c4e5de50218d1f357 (patch) | |
tree | 446f9be5afcc489ce548101086cc03fb52b9047f | |
parent | 07ff5c912730dc7f566d1c9cd6fa814624a2a523 (diff) |
Send build date in diagnostics in unix epoch format. Fix diagnostics submit URL.
-rw-r--r-- | Source/Classes/DiagnosticsViewController.m | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/Classes/DiagnosticsViewController.m b/Source/Classes/DiagnosticsViewController.m index c8562c8..8d35260 100644 --- a/Source/Classes/DiagnosticsViewController.m +++ b/Source/Classes/DiagnosticsViewController.m @@ -95,7 +95,7 @@ _buildDateCell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"DiagnosticsCell"]; [_buildDateCell setSelectionStyle:UITableViewCellSelectionStyleNone]; [[_buildDateCell textLabel] setText:@"Build Date"]; - [[_buildDateCell detailTextLabel] setText:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"MumbleBuildDate"]]; + [[_buildDateCell detailTextLabel] setText:[[[NSBundle mainBundle] objectForInfoDictionaryKey:@"MumbleBuildDate"] description]]; [[_buildDateCell detailTextLabel] setAdjustsFontSizeToFitWidth:YES]; _sinceLaunchCell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"DiagnosticsCell"]; @@ -284,12 +284,16 @@ // Application [dict setObject:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] forKey:@"version"]; [dict setObject:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"MumbleGitRevision"] forKey:@"git-revision"]; - [dict setObject:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"MumbleBuildDate"] forKey:@"build-date"]; + + NSDate *buildDate = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"MumbleBuildDate"]; + NSString *buildDateString = [NSString stringWithFormat:@"%.2f", [buildDate timeIntervalSince1970]]; + [dict setObject:buildDateString forKey:@"build-date-epoch"]; + [dict setObject:[NSString stringWithFormat:@"%.2f", [(AppDelegate *)[[UIApplication sharedApplication] delegate] timeIntervalSinceLaunch]] forKey:@"time-since-launch"]; // Audio [dict setObject:[NSString stringWithFormat:@"%li", bench.avgPreprocessorRuntime] forKey:@"preprocessor-avg-runtime"]; - NSURL *url = [NSURL URLWithString:@"https://mumble-iphoneos.appspot.com/diagnostics"]; + NSURL *url = [NSURL URLWithString:@"https://mumble-ios.appspot.com/diagnostics"]; NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:10.0f]; [req setHTTPMethod:@"POST"]; [req setValue:[NSString stringWithFormat:@"multipart/form-data; boundary=%@", boundary] forHTTPHeaderField:@"Content-Type"]; |