Apple IDFA 传达
为了使用监测广告效果、adPOPcorn 广告商品时,必须在我方 framework 中登录 Apple IDFA。
添加 AdSupport.framework 后,直接修改位于 Xcode 的 Classes Group 内的 UnityAppController.mm 后进行集成。
// Xcode Project
#import <AdSupport/AdSupport.h>
#import <IgaworksCore/IgaworksCore.h>
- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions{
if (NSClassFromString(@"ASIdentifierManager")){
NSUUID *ifa = [[ASIdentifierManager sharedManager] advertisingIdentifier];
BOOL isAppleAdvertisingTrackingEnabled = [[ASIdentifierManager sharedManager] isAdvertisingTrackingEnabled];
[IgaworksCore setAppleAdvertisingIdentifier:[ifa UUIDString] isAppleAdvertisingTrackingEnabled:isAppleAdvertisingTrackingEnabled];
NSLog(@"[ifa UUIDString] : %@", [ifa UUIDString]);
}
}