通过设置 UserAgent 让服务器识别 app信息
- (void) resetUserAgent {
// Do any additional setup after loading the view, typically from a nib.
UIWebView *webView = [[[UIWebView alloc] initWithFrame:CGRectZero] autorelease];
NSString *Agent = [webView stringByEvaluatingJavaScriptFromString:@"navigator.userAgent"];
//add my info to the new agent
NSString *newAgent = nil;
newAgent = [Agent stringByAppendingString:@" myMobileApp"];
//regist the new agent
NSDictionary *dictionnary = [[NSDictionary alloc] initWithObjectsAndKeys:newAgent, @"UserAgent",nil];
[[NSUserDefaults standardUserDefaults] registerDefaults:dictionnary];
}