Advertising module
- Enum:
AffiseModules.ADVERTISING(lib/module/affise_modules.dart:5) - Native key:
"Advertising"(lib/module/affise_modules.dart:33) - Dart accessor:
Affise.module.advertising→AffiseModuleAdvertisingApi(lib/affise.dart:224,lib/module/attribution/affise_attribution_module.dart:18, 33) - Implementation:
lib/module/advertising/affise_advertising.dart:8 - API:
lib/module/advertising/affise_module_advertising_api.dart:3
Purpose
Section titled “Purpose”README 378-409 — collects Google Advertising ID (GAID) and other vendor-specific advertising identifiers (Amazon Fire OS, ColorOS, Alternative Store, etc.) after the user grants tracking permission.
Dart class
Section titled “Dart class”abstract class AffiseAdvertising implements AffiseModuleAdvertisingApi { void startModule(); Future<bool> hasModule();}lib/module/advertising/affise_advertising.dart.
Manual start (iOS)
Section titled “Manual start (iOS)”Affise.module.advertising.startModule();Platform
Section titled “Platform”Cross-platform.
Install
Section titled “Install”flutter pub add affise_attribution_libflutter pub add affise_attribution_module_advertisingor add the dependency to pubspec.yaml:
dependencies: affise_attribution_lib: ^1.7.16 affise_attribution_module_advertising: ^1.7.16The package does not expose a Dart API of its own — it only pulls in the native module dependency:
- Android:
com.affise:module-advertising:1.7.16 - iOS (CocoaPods):
AffiseModule/Advertising1.7.16 - iOS (Swift Package Manager):
AffiseModuleAdvertising1.7.16
Module APIs (Affise.module.*, AffiseModules) remain in affise_attribution_lib.
iOS Info.plist
Section titled “iOS Info.plist”NSUserTrackingUsageDescription is required regardless of the install route — the app will crash without it when this module is active (README 494-503). See Configuration.
Native setup (alternative)
Section titled “Native setup (alternative)”Instead of the Flutter package you can add the native dependency to the platform project yourself (README #### Native):
- Android:
implementation "com.affise:module-advertising:$affise_version" - iOS:
pod 'AffiseModule/Advertising', affise_version
ProviderType contributions
Section titled “ProviderType contributions”GAID_ADID(lib/parameters/provider_type.dart:95)GAID_ADID_MD5(:96)OAID(:97)OAID_MD5(:98)ADID(:99)ALTSTR_ADID(:100)FIREOS_ADID(:101)COLOROS_ADID(:102)AD_PERSONALIZATION(:103)ADVERTISER_TRACKING_ENABLED(:104) — new in 1.7.9APPLICATION_TRACKING_ENABLED(:105) — new in 1.7.9