Commit 2aac98e8 authored by jz's avatar jz

bugfix

parent 4a8352ef
......@@ -110,8 +110,6 @@ static OldPhobos *sharedClient = nil;
@"run_time": PhobosSafeString([PhobosUtil deviceRunTime]),
@"uuid": PhobosSafeString([PhobosDevice getDEVICEID]),
@"uqid": PhobosSafeString([PhobosDevice getUQID]),
@"idfa": PhobosSafeString([PhobosDevice getIDFA]),
@"idfv": PhobosSafeString([PhobosDevice getIDFV]),
@"build_version_release": PhobosSafeString([[UIDevice currentDevice] systemVersion]),
};
[OldPhobos track:@"device_opened" attributes:dict sendNow:YES];
......
......@@ -28,6 +28,7 @@ NSString *defaultIDFA = @"00000000-0000-0000-0000-000000000000";
//直接从钥匙串中获取
NSString *keyChainIDFA = [[ASIdentifierManager sharedManager] advertisingIdentifier].UUIDString;
if ([self checkIdfaIsNull:keyChainIDFA]) {
//如果为空从钥匙串中取获取
keyChainIDFA = [self getKeyChainService:IDFA account:keyChainAccount];
} else {
//如果获取到存储到钥匙串中
......@@ -99,10 +100,11 @@ NSString *defaultIDFA = @"00000000-0000-0000-0000-000000000000";
return [[[UIDevice currentDevice] identifierForVendor] UUIDString];
}
#pragma mark - getDEVICEID
+ (NSString *)getDEVICEID {
NSString *idfa = [self getIDFA];
if (![self checkIdfaIsNull:idfa]) {
if ([self checkIdfaIsNull:idfa]) {
idfa = [self getUQID];
}
return idfa;
......@@ -117,6 +119,7 @@ NSString *defaultIDFA = @"00000000-0000-0000-0000-000000000000";
return deviceId;
}
#pragma mark - 钥匙串封装
+ (void)saveKeyChainWithValue:(NSString *)value service:(NSString *)service account:(NSString *)account {
[SAMKeychain setPassword:value forService:service account:account];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment