1 min read

AppsFlyer

Last Updated - Platform 20.0.0 - PoqAppsFlyer 2.0.0

The PoqAppsFlyer integration allows the AppsFlyer SDK to be plugged into the PoqSDK.

Add AppsFlyer to your App

https://github.com/poqcommerce/Poq.iOS.AppsFlyer.git
PoqAppsFlyer from version 2.0.0

  1. Make sure the AppsFlyer dashboard is set up and note down your AppsFlyer dev key.
  2. Using the information above, add the package to your project.
  3. Add the AppStoreIdentifier key with the correct value to your Info.plist. You can find this through AppStoreConnect.
  4. Import the integration in your AppDelegate.swift.
import PoqAppsFlyer
  1. Register the module using your AppsFlyer dev key.
override func setupModules() {
PoqPlatform.shared.addModule(PoqAppsFlyer(key: "{dev_key}"))
}

You have set up AppsFlyer.

Set up uninstall tracking

  1. In Xcode, navigate to your target's Signing & Capabilities tab and add (+) the Background Modes capability. Skip this if it's already enabled.
  2. Enable Remote notifications in the Background Modes section.
  3. Head to the Apple developer portal and create a production push notification certificate for your app identifier.
  4. If you followed the steps correctly you should have a new certificate with it's private key in Keychain. Export both of these as a P12.
  5. Head to the AppsFlyer dashboard and navigate to the App Settings page for your iOS app.
  6. Under Uninstall measurement upload your P12 and Save Settings ensuring that it shows as enabled.
  1. In Xcode, navigate to your target's Signing & Capabilities tab and add (+) the Associated Domains capability. Skip this if it's already enabled.
  2. In the Associated Domains section, add (+) the applink matching the subdomain value set in the AppsFlyer dashboard for the OneLink template.
applinks:{client}.onelink.me
  1. Head to the Apple developer portal and enable associated domains on your app target. Skip this if it's already enabled.
  2. Regenerate your provisioning profiles to include the associated domain capability.

Customise analytics events

It is easy to replace, modify or add to the events sent to AppsFlyer.

  1. Create your own implementation of PoqAdvancedTrackable (import PoqFoundation) or subclass the PoqAppsFlyerTracker.
  2. Inject your implementation when you initialise and add the module.
PoqPlatform.shared.addModule(PoqAppsFlyer(tracker: CustomTracker()))