1 min read
AppsFlyer
Last Updated - Platform 20.0.0 - PoqAppsFlyer 2.0.0The 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
- Make sure the AppsFlyer dashboard is set up and note down your AppsFlyer dev key.
- Using the information above, add the package to your project.
- Add the
AppStoreIdentifier
key with the correct value to yourInfo.plist
. You can find this through AppStoreConnect. - Import the integration in your
AppDelegate.swift
.
import PoqAppsFlyer
- 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
- In Xcode, navigate to your target's Signing & Capabilities tab and add (+) the Background Modes capability. Skip this if it's already enabled.
- Enable Remote notifications in the Background Modes section.
- Head to the Apple developer portal and create a production push notification certificate for your app identifier.
- 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.
- Head to the AppsFlyer dashboard and navigate to the App Settings page for your iOS app.
- Under Uninstall measurement upload your P12 and Save Settings ensuring that it shows as enabled.
Set up universal links
- In Xcode, navigate to your target's Signing & Capabilities tab and add (+) the Associated Domains capability. Skip this if it's already enabled.
- 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
- Head to the Apple developer portal and enable associated domains on your app target. Skip this if it's already enabled.
- 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.
- Create your own implementation of
PoqAdvancedTrackable
(import PoqFoundation) or subclass thePoqAppsFlyerTracker
. - Inject your implementation when you initialise and add the module.
PoqPlatform.shared.addModule(PoqAppsFlyer(tracker: CustomTracker()))