|
|
@@ -41,7 +41,11 @@ NSString *NTESNotificationLogout = @"NTESNotificationLogout";
|
|
|
// Override point for customization after application launch.
|
|
|
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
|
|
|
self.window.backgroundColor = [UIColor whiteColor];
|
|
|
-
|
|
|
+ UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectZero];
|
|
|
+ NSString *userAgent = [webView stringByEvaluatingJavaScriptFromString:@"navigator.userAgent"];
|
|
|
+ NSString *newUserAgent = [userAgent stringByAppendingString:@" chmo"];//自定义需要拼接的字符串
|
|
|
+ NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:newUserAgent, @"UserAgent", nil];
|
|
|
+ [[NSUserDefaults standardUserDefaults] registerDefaults:dictionary];
|
|
|
|
|
|
NSString *appKey = @"c545b95fd20d5a20d0d1220dc6831e4d";
|
|
|
NIMSDKOption *option = [NIMSDKOption optionWithAppKey:appKey];
|