Beta-AppsFlyerAdobeExtension 6.0.1

Beta-AppsFlyerAdobeExtension 6.0.1

Maintained by Jonathan Wesfield.



 
Depends on:
Beta-AppsFlyerFramework~> 6.0.1
ACPCore>= 0
 

  • By
  • AppsFlyer

beta-appsflyer-adobe-mobile-ios-extension

🛠 In order for us to provide optimal support, we would kindly ask you to submit any issues to [email protected]

When submitting an issue please specify your AppsFlyer sign-up (account) email , your app ID , production steps, logs, code snippets and any additional relevant information.

Table of content

This plugin is built for

  • iOS AppsFlyer SDK v6.0.1-beta

📲 Adding the SDK to your project

Add the following to your app's Podfile:

	pod 'Beta-AppsFlyerAdobeExtension', '~> 6.0.1'

🚀 Initializing the SDK

Register the AppsFlyer extension from your Application class, alongside the Adobe SDK initialisation code:

...
#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;
}

In Addition to adding the init code, the settings inside the launch dashboard must be set.

Setting Description
AppsFlyer iOS App ID Your iTunes application ID (required for iOS only)
AppsFlyer Dev Key Your application devKey provided by AppsFlyer (required)
Bind in-app events for Bind adobe event to appsflyer in-app events. For more info see the doc here.
Send attribution data Send conversion data from the AppsFlyer SDK to adobe. This is required for data elements.
Debug Mode Debug mode - set to true for testing only.

Note: For Send attribution data, use this feature if you are only working with ad networks that allow sharing user level data with 3rd party tools.

📖 Guides

📑 API

See the full API available for this plugin.

📂 Data Elements

Check out the available data elements here.

Swift Example

See the Swift Example here.

Collect IDFA with ATTrackingManager

  1. Add the AppTrackingTransparency framework to your xcode project.

  2. In the Info.plist:

    1. Add an entry to the list: Press + next to Information Property List.
    2. Scroll down and select Privacy - Tracking Usage Description.
    3. Add as the value the wording you want to present to the user when asking for permission to collect the IDFA.
  3. Call the waitForAdvertisingIdentifierWithTimeoutInterval api before registerExtension

	- (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;
	}
  1. On your test device verify that Settings > Privacy > Tracking > Allow Apps to Request to Track, is toggled on.