Skip to content

Commit

Permalink
Add version number to iOS and Mac clients and bump it to 2.1.6
Browse files Browse the repository at this point in the history
Also send the sdk name and version number as part of the request if HockeyApp is used as a server
  • Loading branch information
DerAndereAndi committed Mar 8, 2012
1 parent cc626c1 commit 54c23b2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
16 changes: 11 additions & 5 deletions client/Mac/BWQuincyManager.m
Expand Up @@ -31,6 +31,9 @@
#import "BWQuincyUI.h"
#import <sys/sysctl.h>

#define SDK_NAME @"Quincy"
#define SDK_VERSION @"2.1.6"

@interface BWQuincyManager(private)
- (void) startManager;

Expand Down Expand Up @@ -295,11 +298,14 @@ - (void)_postXML:(NSString*)xml toURL:(NSURL*)url {
NSString *boundary = @"----FOO";

if (self.appIdentifier) {
request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@api/2/apps/%@/crashes",
self.submissionURL,
[self.appIdentifier stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]
]
]];
request = [NSMutableURLRequest requestWithURL:
[NSURL URLWithString:[NSString stringWithFormat:@"%@api/2/apps/%@/crashes?sdk=%@&sdk_version=%@",
self.submissionURL,
[self.appIdentifier stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],
SDK_NAME,
SDK_VERSION
]
]];
} else {
request = [NSMutableURLRequest requestWithURL:url];
}
Expand Down
15 changes: 10 additions & 5 deletions client/iOS/BWQuincyManager.m
Expand Up @@ -35,6 +35,9 @@
#include <sys/sysctl.h>
#include <inttypes.h> //needed for PRIx64 macro

#define SDK_NAME @"Quincy"
#define SDK_VERSION @"2.1.6"

NSBundle *quincyBundle(void) {
static NSBundle* bundle = nil;
if (!bundle) {
Expand Down Expand Up @@ -606,11 +609,13 @@ - (void)_postXML:(NSString*)xml toURL:(NSURL*)url {

if (self.appIdentifier) {
request = [NSMutableURLRequest requestWithURL:
[NSURL URLWithString:[NSString stringWithFormat:@"%@api/2/apps/%@/crashes",
self.submissionURL,
[self.appIdentifier stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]
]
]];
[NSURL URLWithString:[NSString stringWithFormat:@"%@api/2/apps/%@/crashes?sdk=%@&sdk_version=%@",
self.submissionURL,
[self.appIdentifier stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],
SDK_NAME,
SDK_VERSION
]
]];
} else {
request = [NSMutableURLRequest requestWithURL:url];
}
Expand Down
2 changes: 1 addition & 1 deletion demo/iOS/QuincyDemo.xcodeproj/project.pbxproj
Expand Up @@ -164,7 +164,7 @@
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0420;
LastUpgradeCheck = 0430;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "QuincyDemo" */;
compatibilityVersion = "Xcode 3.2";
Expand Down

0 comments on commit 54c23b2

Please sign in to comment.