...
|
...
|
@@ -66,8 +66,8 @@ static NSString * const kOpenUDIDOOTSKey = @"OpenUDID_optOutTS"; |
|
|
static NSString * const kOpenUDIDDomain = @"org.OpenUDID";
|
|
|
static NSString * const kOpenUDIDSlotPBPrefix = @"org.OpenUDID.slot.";
|
|
|
static int const kOpenUDIDRedundancySlots = 100;
|
|
|
static NSString * const kYohoSecretInfo = @"com.yoho.buy.secretinfo";
|
|
|
static NSString * const kYohoBuyUdid = @"com.yoho.buy.udid";
|
|
|
static NSString * const kYohoSecretInfo = @"secretinfo";
|
|
|
static NSString * const kYohoBuyUdid = @"udid";
|
|
|
|
|
|
static BOOL isNew = YES;
|
|
|
static NSString * const kYohoDeviceInfo = @"com.yoho.buy.deviceinfo";
|
...
|
...
|
@@ -168,14 +168,18 @@ static NSString * const kYohoBuyFirstLaunch = @"com.yoho.buy.firstlaunch"; |
|
|
static NSString * shareUdidString = nil;
|
|
|
static dispatch_once_t onceToken;
|
|
|
dispatch_once(&onceToken, ^{
|
|
|
NSMutableDictionary *keychainnamepasswordKVPairs = (NSMutableDictionary *)[YH_KeychainStore load:kYohoSecretInfo];
|
|
|
NSString * udidString = [keychainnamepasswordKVPairs objectForKey:kYohoBuyUdid];
|
|
|
NSString *bundleId = [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleIdentifierKey];
|
|
|
NSString *secretInfoKey = [NSString stringWithFormat:@"%@.%@", bundleId, kYohoSecretInfo];
|
|
|
NSString *appUdidKey = [NSString stringWithFormat:@"%@.%@", bundleId, kYohoBuyUdid];
|
|
|
|
|
|
NSMutableDictionary *keychainnamepasswordKVPairs = (NSMutableDictionary *)[YH_KeychainStore load:secretInfoKey];
|
|
|
NSString * udidString = [keychainnamepasswordKVPairs objectForKey:appUdidKey];
|
|
|
|
|
|
if (udidString == nil || udidString.length == 0) {
|
|
|
NSString* lvstring = [OpenUDID valueWithError:nil];
|
|
|
NSString * lvstring = [OpenUDID valueWithError:nil];
|
|
|
NSMutableDictionary * yohoinfoKVPairs = [NSMutableDictionary dictionary];
|
|
|
[yohoinfoKVPairs setObject:lvstring forKey:kYohoBuyUdid];
|
|
|
[YH_KeychainStore save:kYohoSecretInfo data:yohoinfoKVPairs];
|
|
|
[yohoinfoKVPairs setObject:lvstring forKey:appUdidKey];
|
|
|
[YH_KeychainStore save:secretInfoKey data:yohoinfoKVPairs];
|
|
|
udidString = lvstring;
|
|
|
}
|
|
|
shareUdidString = [NSString stringWithString:udidString];
|
...
|
...
|
|