beta-appsflyer-adobe-mobile-ios-extension
提交问题时,请指定您的 AppsFlyer 注册(账户)电子邮件、应用 ID、生产步骤、日志、代码片段以及任何其他相关信息的附加信息。
目录
此插件为以下构建
- iOS AppsFlyer SDK 6.0.1-beta
📲 将 SDK 添加到项目中
将以下内容添加到您的应用的 Podfile
pod 'Beta-AppsFlyerAdobeExtension', '~> 6.0.1'
🚀 初始化 SDK
从您的 Application
类中注册 AppsFlyer 扩展,并与其他 Adobe SDK 初始化代码一起使用
...
#import "AppsFlyerAdobeExtension/AppsFlyerAdobeExtension.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[ACPCore configureWithAppId:@"Key"];
...
[AppsFlyerAdobeExtension registerExtension];
...
[AppsFlyerAdobeExtension registerCallbacks:^(NSDictionary *dictionary) {
NSLog(@"[AppsFlyerAdobeExtension] Received callback: %@", dictionary);
if([[dictionary objectForKey:@"callback_type"] isEqualToString:@"onConversionDataReceived"]){
if([[dictionary objectForKey:@"is_first_launch"] boolValue] == YES){
NSString* af_status = [dictionary objectForKey:@"af_status"];
if([af_status isEqualToString:@"Non-organic"]){
NSLog(@"this is first launch and a non organic install!");
}
}
} else if([[dictionary objectForKey:@"callback_type"] isEqualToString:@"onAppOpenAttribution"]) {
NSLog(@"onAppOpenAttribution Received");
}
}];
[AppsFlyerAdobeExtension callbacksErrorHandler:^(NSError *error) {
NSLog(@"[AppsFlyerAdobeExtension] Error receivng callback: %@" , error);
}];
return YES;
}
除了添加初始化代码外,还需要设置启动仪表板中的内部设置。

设置 | 描述 |
---|---|
AppsFlyer iOS 应用 ID | 您的 iTunes 应用编号(仅适用于 iOS)(必需) |
AppsFlyer 开发者密钥 | 由 AppsFlyer 提供的应用 开发者密钥(必需) |
为以下情况绑定应用内事件 | 将 Adobe 事件绑定到 AppsFlyer 应用内事件。了解更多信息请查看这里的文档。 |
发送归因数据 | 从 AppsFlyer SDK 向 Adobe 发送转换数据。这是数据元素所必需的。 |
调试模式 | 调试模式 - 仅在测试时设置为 true 。 |
注意:对于发送归因数据,如果您仅在与允许与第三方工具共享用户级别数据的广告网络合作,请使用此功能。
📖 指南
📑 API
📂 数据元素
在此查看可用的数据元素
Swift 示例
查看 Swift 示例
使用 ATTrackingManager 收集 IDFA
-
将
AppTrackingTransparency
框架添加到您的 xcode 项目中。 -
在
Info.plist
中- 向列表中添加一个条目:按 + 箭头键添加到
信息属性列表
。 - 向下滚动并选择
Privacy - Tracking Usage Description
。 - 将用户请求收集 IDFA 时要显示的文本作为值添加。
- 向列表中添加一个条目:按 + 箭头键添加到
-
在调用
registerExtension
之前调用waitForAdvertisingIdentifierWithTimeoutInterval
api
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[ACPCore setLogLevel:ACPMobileLogLevelVerbose];
[ACPCore configureWithAppId:@"launch-key"];
if (@available(iOS 14, *)) {
[[AppsFlyerLib shared] waitForAdvertisingIdentifierWithTimeoutInterval:60];
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status){
}];
}
[AppsFlyerAdobeExtension registerExtension];
...
return YES;
}
- 在测试设备上验证 Settings > Privacy > Tracking > 允许应用程序请求跟踪,是否开启。