{"id":21478244,"url":"https://github.com/appsflyersdk/appsflyer-adobe-mobile-ios-extension","last_synced_at":"2025-07-15T10:34:03.153Z","repository":{"id":42450512,"uuid":"153287960","full_name":"AppsFlyerSDK/appsflyer-adobe-mobile-ios-extension","owner":"AppsFlyerSDK","description":"AppsFlyer iOS SDK Extension for Adobe Mobile SDK","archived":false,"fork":false,"pushed_at":"2024-03-25T12:41:29.000Z","size":20015,"stargazers_count":0,"open_issues_count":4,"forks_count":9,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-05-16T00:41:06.606Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AppsFlyerSDK.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-10-16T13:14:16.000Z","updated_at":"2021-12-15T13:25:38.000Z","dependencies_parsed_at":"2024-03-25T12:40:43.489Z","dependency_job_id":"d7a3093c-c6cf-491c-83cf-7ede5f00ef66","html_url":"https://github.com/AppsFlyerSDK/appsflyer-adobe-mobile-ios-extension","commit_stats":null,"previous_names":["appsflyersdk/appsflyeradobeextension"],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppsFlyerSDK%2Fappsflyer-adobe-mobile-ios-extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppsFlyerSDK%2Fappsflyer-adobe-mobile-ios-extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppsFlyerSDK%2Fappsflyer-adobe-mobile-ios-extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppsFlyerSDK%2Fappsflyer-adobe-mobile-ios-extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AppsFlyerSDK","download_url":"https://codeload.github.com/AppsFlyerSDK/appsflyer-adobe-mobile-ios-extension/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226033200,"owners_count":17563127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-23T11:17:24.450Z","updated_at":"2024-11-23T11:17:25.332Z","avatar_url":"https://github.com/AppsFlyerSDK.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"gitresources/AF_Logo_primary_logo.png\"  width=\"400\" \u003e \n\n# appsflyer-adobe-mobile-ios-extension\n\n[![Version](https://img.shields.io/cocoapods/v/AppsFlyerAdobeExtension.svg?style=flat)](http://cocoapods.org/pods/AppsFlyerAdobeExtension)\n\n\n🛠 In order for us to provide optimal support, we would kindly ask you to submit any issues to support@appsflyer.com\n\n\u003e *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.*\n\n## Table of content\n\n- [Adding the SDK to your project](#add-sdk-to-project)\n- [Initializing the SDK](#init-sdk)\n- [Manual Mode](#manual-mode)\n- [Guides](#guides)\n- [API](#api) \n- [Data Elements](#data-elements)\n- [Send consent for DMA compliance](#dma_support)\n- [Swift Example](#swift-example)\n\n\n### \u003ca id=\"plugin-build-for\"\u003e This plugin is built for\n    \n- iOS AppsFlyer SDK **v6.13.1**\n\n## \u003ca id=\"add-sdk-to-project\"\u003e 📲 Adding the SDK to your project\n\nAdd the following to your app's `Podfile`:\n\n```javascript\npod 'AppsFlyerAdobeExtension', '6.13.1'\n```\n\n## \u003ca id=\"init-sdk\"\u003e 🚀 Initializing the SDK\n    \nRegister the AppsFlyer extension from your `Application` class, alongside the Adobe SDK initialisation code: \n```objc\n...\n#import \"AppsFlyerAdobeExtension/AppsFlyerAdobeExtension.h\"\n\n@implementation AppDelegate\n\n\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n    [ACPCore configureWithAppId:@\"Key\"];\n    ...\n    [AppsFlyerAdobeExtension registerExtension];\n    ...\n    \n    [AppsFlyerAdobeExtension registerCallbacks:^(NSDictionary *dictionary) {\n        NSLog(@\"[AppsFlyerAdobeExtension] Received callback: %@\", dictionary);\n        if([[dictionary objectForKey:@\"callback_type\"] isEqualToString:@\"onConversionDataReceived\"]){\n            if([[dictionary objectForKey:@\"is_first_launch\"] boolValue] == YES){\n                NSString* af_status = [dictionary objectForKey:@\"af_status\"];\n                if([af_status isEqualToString:@\"Non-organic\"]){\n                    NSLog(@\"this is first launch and a non organic install!\");\n                }\n            }\n        } else if([[dictionary objectForKey:@\"callback_type\"] isEqualToString:@\"onAppOpenAttribution\"]) {\n            NSLog(@\"onAppOpenAttribution Received\");\n        }\n     }];\n\n    [AppsFlyerAdobeExtension callbacksErrorHandler:^(NSError *error) {\n          NSLog(@\"[AppsFlyerAdobeExtension] Error receivng callback: %@\" , error);\n      }];\n    \n    return YES;\n}\n\n```\n\nIn Addition to adding the init code, the settings inside the launch dashboard must be set.\n\n\u003cimg src=\"./gitresources/LaunchAFInitNew.png\" width=\"550\" \u003e\n\n| Setting  | Description   |\n| -------- | ------------- |\n| AppsFlyer iOS App ID      | Your iTunes [application ID](https://support.appsflyer.com/hc/en-us/articles/207377436-Adding-a-new-app#available-in-the-app-store-google-play-store-windows-phone-store)  (required for iOS only)  |\n| AppsFlyer Dev Key   | Your application [devKey](https://support.appsflyer.com/hc/en-us/articles/211719806-Global-app-settings-#sdk-dev-key) provided by AppsFlyer (required)  |\n| Bind in-app events for    | Bind adobe event to appsflyer in-app events. For more info see the doc [here](/docs/Guides.md#events). |\n| Send attribution data    | Send conversion data from the AppsFlyer SDK to adobe. This is required for data elements. |\n| Debug Mode    | Debug mode - set to `true` for testing only.  |\n| Wait for ECID   | Once enabled, the SDK Initialization will be delayed until the Experience Cloud ID is set.  |\n\n\u003e 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.\n\n## \u003ca id=\"manual-mode\"\u003e Manual mode\nStarting version `6.13.0`, we support a manual mode to separate the initialization of the AppsFlyer SDK and the start of the SDK.\u003c/br\u003e\nIn this case, the AppsFlyer SDK won't start automatically, giving the developer more freedom when to start the AppsFlyer SDK.\u003c/br\u003e\nPlease note that in manual mode, the developer is required to implement the API ``[[AppsFlyerLib shared] start]`` in order to start the SDK.\u003c/br\u003e \nYou should set this mode before starting the `MobileCore` SDK and after registering the extensions in `AppDelegate`.\u003c/br\u003e\nIf you are using CMP to collect consent data this feature is needed. See explanation [here](/SendConsentForDMACompliance.md).\n### Example:  \n```objective-c\n[ACPCore configureWithAppId:@\"\u003cADOBE_DEV_KEY\u003e\"];\n[AppsFlyerAdobeExtension registerExtension];\nAppsFlyerAdobeExtension.shared.manual = true;\n...\n[ACPCore start:^{\n    [ACPCore lifecycleStart:nil];\n}];\n``` \nPlease look at the example below to see how to start SDK once you want.\u003c/br\u003e\nKeep in mind you shouldn't put the `start()` on a lifecycle method.\u003c/br\u003e\nTo start the AppsFlyer SDK, use the `start()` API, like the following :  \n```objective-c\n[[AppsFlyerLib shared] start];\nAppsFlyerAdobeExtension.shared.manual = false;\n```   \nYou need to end the manual mode. This will  tell the Extension to call \u003ccode\u003estart()\u003c/code\u003e from this point.\n\n\n## \u003ca id=\"guides\"\u003e 📖 Guides\n\n- [Deep Linking](/docs/Guides.md#deeplinking)\n- [In-App Events](/docs/Guides.md#events)\n- [Data Elements](/docs/Guides.md#data-elements)\n- [Attribution Data tracking with Adobe Analytics](/docs/Guides.md#attr-data)\n- [Deeplink Data tracking with Adobe Analytics](/docs/Guides.md#deeplink-data)\n\n## \u003ca id=\"api\"\u003e 📑 API\n  \nSee the full [API](/docs/API.md) available for this plugin.\n\n\n## \u003ca id=\"data-elements\"\u003e 📂 Data Elements\n  \nCheck out the available data elements [here](/docs/DataElements.md).\n\n## \u003ca id=\"dma_support\"\u003e Send consent for DMA compliance\nFor a general introduction to DMA consent data, see [here](https://dev.appsflyer.com/hc/docs/send-consent-for-dma-compliance).\u003cbe\u003e\nThe SDK offers two alternative methods for gathering consent data:\u003cbr\u003e\n- **Through a Consent Management Platform (CMP)**: If the app uses a CMP that complies with the [Transparency and Consent Framework (TCF) v2.2 protocol](https://iabeurope.eu/tcf-supporting-resources/), the SDK can automatically retrieve the consent details.\u003cbr\u003e\n\u003cbr\u003eOR\u003cbr\u003e\u003cbr\u003e\n- **Through a dedicated SDK API**: Developers can pass Google's required consent data directly to the SDK using a specific API designed for this purpose.\n### Use CMP to collect consent data\nA CMP compatible with TCF v2.2 collects DMA consent data and stores it in \u003ccode\u003eNSUserDefaults\u003c/code\u003e. To enable the SDK to access this data and include it with every event, follow these steps:\u003cbr\u003e\n\u003col\u003e\n  \u003cli\u003e Call \u003ccode\u003e[[AppsFlyerLib shared] enableTCFDataCollection:true]\u003c/code\u003e to instruct the SDK to collect the TCF data from the device.\n  \u003cli\u003e Add the extension to MobileCore extensions : \u003ccode\u003e[AppsFlyerAdobeExtension registerExtension]\u003c/code\u003e.\n  \u003cli\u003e Set the extension to be on manual mode to \u003ccode\u003etrue\u003c/code\u003e- meaning the developer will have the responsability to start the SDK.\u003c/br\u003e\n       This will allow us to delay the Conversion call in order to provide the SDK with the user consent.\u003cbe\u003e\n       \u003ccode\u003eAppsFlyerAdobeExtension.shared.manual = true\u003c/code\u003e\n  \u003cli\u003e Initialize \u003ccode\u003eMobileCore\u003c/code\u003e. \n  \u003cli\u003e In the \u003ccode\u003eapplicationDidBecomeActive\u003c/code\u003e lifecycle method, use the CMP to decide if you need the consent dialog in the current session to acquire the consent data. If you need the consent dialog move to step 4; otherwise move to step 5.\n  \u003cli\u003e Get confirmation from the CMP that the user has made their consent decision and the data is available in \u003ccode\u003eNSUserDefaults\u003c/code\u003e.\n  \u003cli\u003e Call \u003ccode\u003estart()\u003c/code\u003e to the SDK.\n  \u003cli\u003e Set manual mode to \u003ccode\u003efalse\u003c/code\u003e.\n\u003c/ol\u003e\n\n\n```objective-c\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions\n{\n    [[AppsFlyerLib shared] enableTCFDataCollection:true];\n\n    // Override point for customization after application launch.\n    [ACPCore setLogLevel:ACPMobileLogLevelVerbose];\n    [ACPCore configureWithAppId:@\"DEV_KEY\"];\n\n    \n    [AppsFlyerAdobeExtension registerExtension];\n    [ACPAnalytics registerExtension];\n    [ACPIdentity registerExtension];\n    [ACPLifecycle registerExtension];\n    [ACPSignal registerExtension];\n    AppsFlyerAdobeExtension.shared.manual = true;\n    \n    [ACPCore start:^{\n        [ACPCore lifecycleStart:nil];\n    }];\n\n    [AppsFlyerAdobeExtension registerCallbacks:^(NSDictionary *dictionary) {\n        NSLog(@\"[AppsFlyerAdobeExtension] Received callback: %@\", dictionary);\n    }];\n    \n    [AppsFlyerAdobeExtension callbacksErrorHandler:^(NSError *error) {\n        NSLog(@\"[AppsFlyerAdobeExtension] Error receivng callback: %@\" , error);\n    }];\n\n    return YES;\n}\n\n// Deep Link reporting using Univeral Links.\n - (BOOL) application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray\u003cid\u003cUIUserActivityRestoring\u003e\u003e *restorableObjects))restorationHandler {\n     [AppsFlyerAdobeExtension continueUserActivity:userActivity restorationHandler:restorationHandler];\n    return YES;\n}\n\n// Deep Link reporting for URL Schemes.\n- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary *) options {\n    [AppsFlyerAdobeExtension openURL:url options:options];\n    return YES;\n}\n```\n\n### Manually collect consent data\nIf your app does not use a CMP compatible with TCF v2.2, use the SDK API detailed below to provide the consent data directly to the SDK.\n\u003col\u003e\n  \u003cli\u003e Add the extension to MobileCore extensions : \u003ccode\u003e[AppsFlyerAdobeExtension registerExtension]\u003c/code\u003e.\n  \u003cli\u003e Set the extension to be on manual mode to \u003ccode\u003etrue\u003c/code\u003e- meaning the developer will have the responsability to start the SDK.\u003c/br\u003e\n       This will allow us to delay the Conversion call in order to provide the SDK with the user consent.\u003cbe\u003e\n       \u003ccode\u003eAppsFlyerAdobeExtension.shared.manual = true\u003c/code\u003e\n  \u003cli\u003e Initialize \u003ccode\u003eMobileCore\u003c/code\u003e. \n  \u003cli\u003e In the \u003ccode\u003eapplicationDidBecomeActive\u003c/code\u003e lifecycle method determine whether the GDPR applies or not to the user.\u003cbr\u003e\n  - If GDPR applies to the user, perform the following: \n      \u003col\u003e\n        \u003cli\u003e Given that GDPR is applicable to the user, determine whether the consent data is already stored for this session.\n            \u003col\u003e\n              \u003cli\u003e If there is no consent data stored, show the consent dialog to capture the user consent decision.\n              \u003cli\u003e If there is consent data stored continue to the next step.\n            \u003c/ol\u003e\n        \u003cli\u003e To transfer the consent data to the SDK create an AppsFlyerConsent object with the following parameters:\u003cbr\u003e\n          - \u003ccode\u003eforGDPRUserWithHasConsentForDataUsage\u003c/code\u003e- Indicates whether the user has consented to use their data for advertising purposes.\n          - \u003ccode\u003ehasConsentForAdsPersonalization\u003c/code\u003e- Indicates whether the user has consented to use their data for personalized advertising.\n        \u003cli\u003e Call \u003ccode\u003e[[AppsFlyerLib shared] setConsentData:[[AppsFlyerConsent alloc] initForGDPRUserWithHasConsentForDataUsage:BOOL hasConsentForAdsPersonalization:BOOL]]\u003c/code\u003e. \n        \u003cli\u003e Call \u003ccode\u003estart()\u003c/code\u003e to the SDK.\n        \u003cli\u003e Set manual mode to \u003ccode\u003efalse\u003c/code\u003e.\n      \u003c/ol\u003e\u003cbr\u003e\n    - If GDPR doesn’t apply to the user perform the following:\n      \u003col\u003e\n        \u003cli\u003e Call \u003ccode\u003e[[AppsFlyerLib shared] setConsentData:[[AppsFlyerConsent alloc] initNonGDPRUser]]\u003c/code\u003e.\n        \u003cli\u003e Call \u003ccode\u003estart()\u003c/code\u003e to the SDK.\n        \u003cli\u003e Set manual mode to \u003ccode\u003efalse\u003c/code\u003e.\n      \u003c/ol\u003e\n\u003c/ol\u003e\n\n## \u003ca id=\"swift-example\"\u003e Swift Example\n  \nSee the Swift Example [here](/docs/SwiftExample.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappsflyersdk%2Fappsflyer-adobe-mobile-ios-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappsflyersdk%2Fappsflyer-adobe-mobile-ios-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappsflyersdk%2Fappsflyer-adobe-mobile-ios-extension/lists"}