Commit c8f1b034 authored by jz's avatar jz

upate

parent 141d78de
......@@ -16,8 +16,8 @@ typedef void (^PhobosGetIDFACompleteBlock)(NSDictionary *dict);
/// 获取IDFA,同步获取 从钥匙串中获取
+ (NSString *)getIDFA;
/// 获取IDFA,异步获取IDFA
+ (void)getIDFAString:(PhobosGetIDFACompleteBlock)completeBlock;
/// 获取IDFA,异步获取IDFA 适配 ATTrackingManager的时候再打开
//+ (void)getIDFAString:(PhobosGetIDFACompleteBlock)completeBlock;
/// 获取IDFV
+ (NSString *)getIDFV;
......
......@@ -23,7 +23,21 @@ NSString *defaultIDFA = @"00000000-0000-0000-0000-000000000000";
#pragma mark - getIDFA
//同步获取IDFA 直接从钥匙串中获取
//同步获取IDFA 直接从钥匙串中获取 适配ATTrackingManagerAuthorization可使用下面方法
+ (NSString *)getIDFA {
//直接从钥匙串中获取
NSString *keyChainIDFA = [[ASIdentifierManager sharedManager] advertisingIdentifier].UUIDString;
if ([self checkIdfaIsNull:keyChainIDFA]) {
keyChainIDFA = [self getKeyChainService:IDFA account:keyChainAccount];
} else {
//如果获取到存储到钥匙串中
[self saveKeyChainWithValue:keyChainIDFA service:IDFA account:keyChainAccount];
}
return keyChainIDFA;
}
/** iOS 14 适配 ATTrackingManagerAuthorizationStatus
//同步获取IDFA 直接从钥匙串中获取
+ (NSString *)getIDFA {
//直接从钥匙串中获取
NSString *keyChainIDFA = [self getKeyChainService:IDFA account:keyChainAccount];
......@@ -71,6 +85,7 @@ NSString *defaultIDFA = @"00000000-0000-0000-0000-000000000000";
completeBlock(@{@"idfa": idfaString, @"is_author": @(isAuthor)});
}
}
*/
#pragma mark - 对IDFA判空处理
//检查idfa 是否为空
......
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