Commit aa0bd6f5c322dc5f3d14742eba13e920745968c8
1 parent
855c9d36
no message
Showing
2 changed files
with
7 additions
and
2 deletions
CNLiveBusinessTools.podspec
CNLiveBusinessTools/Classes/CNLiveBusinessTools.m
| ... | ... | @@ -70,8 +70,13 @@ |
| 70 | 70 | uid = [[defauts objectForKey:uidKey] copy]; |
| 71 | 71 | return uid; |
| 72 | 72 | } else { |
| 73 | + NSInteger time = [[NSDate date] timeIntervalSince1970]; | |
| 74 | + NSString *timeString = [NSString stringWithFormat:@"%ld", (long)time]; | |
| 75 | + NSString *stamp = timeString; | |
| 76 | + stamp = [stamp stringByReplacingOccurrencesOfString:@"." withString:@""]; | |
| 73 | 77 | NSString *idfv = [[[[UIDevice currentDevice] identifierForVendor] UUIDString] stringByReplacingOccurrencesOfString:@"-" withString:@""]; |
| 74 | - [defauts setObject:idfv forKey:uidKey]; | |
| 78 | + uid = [NSString stringWithFormat:@"%@_%@", idfv, stamp]; | |
| 79 | + [defauts setObject:uid forKey:uidKey]; | |
| 75 | 80 | [defauts synchronize]; |
| 76 | 81 | return uid; |
| 77 | 82 | } | ... | ... |