pnlight_sdk to add PNLight to a Flutter app on iOS.
Requirements
- Flutter 3.3.0+
- Dart 2.17.0 or later, below 4.0.0
- iOS 12.0+
Install
Add the package:iOS setup
If you useRemoteUiView, add the DivKit CocoaPods source to ios/Podfile before other sources:
NSUserTrackingUsageDescription to Info.plist:
Initialize the SDK
Common calls
logEvent sends optional in-app events to PNLight. You can review them in Analytics → App Events, on the Events page, and in customer timelines.
Remote Config
Fetch Remote Config after initialization. Read values with typed getters and fallbacks your app owns.fetchAndActivate waits briefly for AppsFlyer attribution and uses a 15-minute minimum fetch interval. See Remote Config for fetch results, local defaults, and all supported value types.
IDFA after ATT
If PNLight initializes before the App Tracking Transparency prompt completes, callupdateIdfa() after authorization so PNLight receives the granted IDFA.
Remote UI
onPurchased when a schema v3 or v4 Remote UI document starts a purchase with pnlight.purchase and the app needs to refresh entitlements after StoreKit verifies it.
The Flutter package wraps the PNLight iOS SDK. Do not call PNLight SDK methods on unsupported platforms.