Commit 8ab8e6ab0a022187914b6a054e907b9bb6980485

Authored by yanglingyu
1 parent 6b5bdb46

appstote被拒首次修改

CNLiveScioLive/Pages/Login/Controller/CNLiveLoginViewController.m
... ... @@ -471,7 +471,7 @@
471 471 [mDict setValue:@"i" forKey:@"plat"];
472 472 [mDict setValue:[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"] forKey:@"ver"];
473 473 [mDict setObject:CNLiveAppId forKey:@"appId"];
474   - [mDict setValue:[[[[UIDevice currentDevice] identifierForVendor] UUIDString] stringByReplacingOccurrencesOfString:@"-" withString:@""] forKey:@"uuid"];
  474 + [mDict setValue:[self uuid] forKey:@"uuid"];
475 475  
476 476 [CNLiveNetworking setupDefaultParam:mDict];
477 477 [CNLiveNetworking setupShowResult:NO];
... ... @@ -480,6 +480,25 @@
480 480 [CNLiveNetworking setResponseSerializerType:CNLiveResponseSerializerJSON];
481 481  
482 482 }
  483 +- (NSString *)uuid{
  484 + NSString *uid = @"";
  485 + NSString *uidKey = @"kCNLiveUserDefaultsUIDKey";
  486 + NSUserDefaults *defauts = [NSUserDefaults standardUserDefaults];
  487 + if ([defauts objectForKey:uidKey]) {
  488 + uid = [[defauts objectForKey:uidKey] copy];
  489 + return uid;
  490 + } else {
  491 + NSInteger time = [[NSDate date] timeIntervalSince1970];
  492 + NSString *timeString = [NSString stringWithFormat:@"%ld", (long)time];
  493 + NSString *stamp = timeString;
  494 + stamp = [stamp stringByReplacingOccurrencesOfString:@"." withString:@""];
  495 + NSString *idfv = [[[[UIDevice currentDevice] identifierForVendor] UUIDString] stringByReplacingOccurrencesOfString:@"-" withString:@""];
  496 + uid = [NSString stringWithFormat:@"%@_%@", idfv, stamp];
  497 + [defauts setObject:uid forKey:uidKey];
  498 + [defauts synchronize];
  499 + return uid;
  500 + }
  501 +}
483 502  
484 503 - (UIStatusBarStyle)preferredStatusBarStyle {
485 504 return UIStatusBarStyleLightContent;
... ...
... ... @@ -16,7 +16,7 @@ target 'CNLiveScioLive' do
16 16 pod 'SDWebImage/GIF'
17 17 pod 'SDWebImage', '~> 4.0.0'
18 18 pod 'AFNetworking'#, '~> 3.1.0'
19   - pod 'YYKit', '~> 1.0.9'
  19 +# pod 'YYKit', '~> 1.0.9'
20 20 pod 'MJRefresh', '~> 3.1.12'
21 21 pod 'Masonry', '~> 1.0.2'
22 22 pod 'WebViewJavascriptBridge', '~> 6.0.3'
... ...