Skip to content

Commit

Permalink
Add analytics headers
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronpk committed Jan 13, 2012
1 parent d1a56ed commit 8ed0fe8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Classes/LQClient.m
Expand Up @@ -149,6 +149,18 @@ - (NSString *)hardware
return machine;
}

- (void)addAnalyticsHeaders:(ASIHTTPRequest *)request {
UIDevice *d = [UIDevice currentDevice];
NSDictionary *bundleInfo = [[NSBundle mainBundle] infoDictionary];
[request addRequestHeader:@"X-LQ-Device-Manufacturer" value:@"Apple"];
[request addRequestHeader:@"X-LQ-Device-Hardware" value:[self hardware]];
[request addRequestHeader:@"X-LQ-Device-OS" value:d.systemName];
[request addRequestHeader:@"X-LQ-Device-Version" value:d.systemVersion];
[request addRequestHeader:@"X-LQ-Package-Name" value:[bundleInfo objectForKey:@"CFBundleIdentifier"]];
[request addRequestHeader:@"X-LQ-Package-Version" value:[bundleInfo objectForKey:@"CFBundleVersion"]];
}


/*
// This was for queuing/dequeuing requests so we could refresh the access token if necessary
- (void)dequeueUserRequestIfPossible {
Expand Down

0 comments on commit 8ed0fe8

Please sign in to comment.