我正在开发其他应用将集成的iOS SDK。如果运行我的代码的应用程序与AdSupport.framework
相关联,我想使用IDFA进行安装归因。否则不是。
当我使用以下代码时,Apple会拒绝该应用程序吗?
+ (NSString *)appleIDFA {
NSString *idfa = nil;
Class ASIdentifierManagerClass = NSClassFromString(@"ASIdentifierManager");
if (ASIdentifierManagerClass) {
SEL sharedManagerSelector = NSSelectorFromString(@"sharedManager");
id sharedManager = ((id (*)(id, SEL))[ASIdentifierManagerClass methodForSelector:sharedManagerSelector])(ASIdentifierManagerClass, sharedManagerSelector);
SEL advertisingIdentifierSelector = NSSelectorFromString(@"advertisingIdentifier");
NSUUID *advertisingIdentifier = ((NSUUID* (*)(id, SEL))[sharedManager methodForSelector:advertisingIdentifierSelector])(sharedManager, advertisingIdentifierSelector);
idfa = [advertisingIdentifier UUIDString];
}
return idfa;
}
答案 0 :(得分:0)
我最终使用了这些解决方案并且没有遇到任何问题。