Skip to content

AdService module

iOS 14.3+. Sends attributionToken from AdServices framework AAAttribution.attributionToken() to Affise server.

  • AffiseModules.ADSERVICE = "AdService" (src/module/AffiseModules.ts:1-16)
  • iOS only. Requires iOS 14.3+.
  • Android builds do not include this module.

Since 1.7.16 the module ships as its own npm package, affise-attribution-module-adservice (iOS). Install it next to the core library:

Terminal window
npm install affise-attribution-lib
npm install affise-attribution-module-adservice

The package only pulls in the native dependency (AffiseModule/AdService at 1.7.16); its JS entry point is empty, so keep importing everything from affise-attribution-lib. Run pod install and rebuild the iOS app after installing.

Instead of the npm package you can add the native dependency yourself (README “Modules → Manual Native”):

pod 'AffiseModule/AdService', '1.7.16'

This module feeds the AttributionToken field used server-side; no new ProviderType constants are declared for it in the TypeScript enum at 1.7.16.