|
@@ -66,8 +66,8 @@ static NSString * const kOpenUDIDOOTSKey = @"OpenUDID_optOutTS"; |
|
@@ -66,8 +66,8 @@ static NSString * const kOpenUDIDOOTSKey = @"OpenUDID_optOutTS"; |
66
|
static NSString * const kOpenUDIDDomain = @"org.OpenUDID";
|
66
|
static NSString * const kOpenUDIDDomain = @"org.OpenUDID";
|
67
|
static NSString * const kOpenUDIDSlotPBPrefix = @"org.OpenUDID.slot.";
|
67
|
static NSString * const kOpenUDIDSlotPBPrefix = @"org.OpenUDID.slot.";
|
68
|
static int const kOpenUDIDRedundancySlots = 100;
|
68
|
static int const kOpenUDIDRedundancySlots = 100;
|
69
|
-static NSString * const kYohoSecretInfo = @"com.yoho.buy.secretinfo";
|
|
|
70
|
-static NSString * const kYohoBuyUdid = @"com.yoho.buy.udid";
|
69
|
+static NSString * const kYohoSecretInfo = @"secretinfo";
|
|
|
70
|
+static NSString * const kYohoBuyUdid = @"udid";
|
71
|
|
71
|
|
72
|
static BOOL isNew = YES;
|
72
|
static BOOL isNew = YES;
|
73
|
static NSString * const kYohoDeviceInfo = @"com.yoho.buy.deviceinfo";
|
73
|
static NSString * const kYohoDeviceInfo = @"com.yoho.buy.deviceinfo";
|
|
@@ -168,14 +168,18 @@ static NSString * const kYohoBuyFirstLaunch = @"com.yoho.buy.firstlaunch"; |
|
@@ -168,14 +168,18 @@ static NSString * const kYohoBuyFirstLaunch = @"com.yoho.buy.firstlaunch"; |
168
|
static NSString * shareUdidString = nil;
|
168
|
static NSString * shareUdidString = nil;
|
169
|
static dispatch_once_t onceToken;
|
169
|
static dispatch_once_t onceToken;
|
170
|
dispatch_once(&onceToken, ^{
|
170
|
dispatch_once(&onceToken, ^{
|
171
|
- NSMutableDictionary *keychainnamepasswordKVPairs = (NSMutableDictionary *)[YH_KeychainStore load:kYohoSecretInfo];
|
|
|
172
|
- NSString * udidString = [keychainnamepasswordKVPairs objectForKey:kYohoBuyUdid];
|
171
|
+ NSString *bundleId = [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleIdentifierKey];
|
|
|
172
|
+ NSString *secretInfoKey = [NSString stringWithFormat:@"%@.%@", bundleId, kYohoSecretInfo];
|
|
|
173
|
+ NSString *appUdidKey = [NSString stringWithFormat:@"%@.%@", bundleId, kYohoBuyUdid];
|
|
|
174
|
+
|
|
|
175
|
+ NSMutableDictionary *keychainnamepasswordKVPairs = (NSMutableDictionary *)[YH_KeychainStore load:secretInfoKey];
|
|
|
176
|
+ NSString * udidString = [keychainnamepasswordKVPairs objectForKey:appUdidKey];
|
173
|
|
177
|
|
174
|
if (udidString == nil || udidString.length == 0) {
|
178
|
if (udidString == nil || udidString.length == 0) {
|
175
|
- NSString* lvstring = [OpenUDID valueWithError:nil];
|
179
|
+ NSString * lvstring = [OpenUDID valueWithError:nil];
|
176
|
NSMutableDictionary * yohoinfoKVPairs = [NSMutableDictionary dictionary];
|
180
|
NSMutableDictionary * yohoinfoKVPairs = [NSMutableDictionary dictionary];
|
177
|
- [yohoinfoKVPairs setObject:lvstring forKey:kYohoBuyUdid];
|
|
|
178
|
- [YH_KeychainStore save:kYohoSecretInfo data:yohoinfoKVPairs];
|
181
|
+ [yohoinfoKVPairs setObject:lvstring forKey:appUdidKey];
|
|
|
182
|
+ [YH_KeychainStore save:secretInfoKey data:yohoinfoKVPairs];
|
179
|
udidString = lvstring;
|
183
|
udidString = lvstring;
|
180
|
}
|
184
|
}
|
181
|
shareUdidString = [NSString stringWithString:udidString];
|
185
|
shareUdidString = [NSString stringWithString:udidString];
|