Commit aa0bd6f5c322dc5f3d14742eba13e920745968c8
1 parent
855c9d36
no message
Showing
2 changed files
with
7 additions
and
2 deletions
CNLiveBusinessTools.podspec
| @@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
| 8 | 8 | ||
| 9 | Pod::Spec.new do |s| | 9 | Pod::Spec.new do |s| |
| 10 | s.name = 'CNLiveBusinessTools' | 10 | s.name = 'CNLiveBusinessTools' |
| 11 | - s.version = '0.1.6' | 11 | + s.version = '0.1.7' |
| 12 | s.summary = '业务工具集合组件.' | 12 | s.summary = '业务工具集合组件.' |
| 13 | 13 | ||
| 14 | # This description is used to generate tags and improve search results. | 14 | # This description is used to generate tags and improve search results. |
CNLiveBusinessTools/Classes/CNLiveBusinessTools.m
| @@ -70,8 +70,13 @@ | @@ -70,8 +70,13 @@ | ||
| 70 | uid = [[defauts objectForKey:uidKey] copy]; | 70 | uid = [[defauts objectForKey:uidKey] copy]; |
| 71 | return uid; | 71 | return uid; |
| 72 | } else { | 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 | NSString *idfv = [[[[UIDevice currentDevice] identifierForVendor] UUIDString] stringByReplacingOccurrencesOfString:@"-" withString:@""]; | 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 | [defauts synchronize]; | 80 | [defauts synchronize]; |
| 76 | return uid; | 81 | return uid; |
| 77 | } | 82 | } |