pnlight_sdk for Flutter apps that need PNLight 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.
IDFA after ATT
If PNLight initializes before the App Tracking Transparency prompt completes, callupdateIdfa() after authorization so PNLight receives the granted IDFA.
Remote UI
The Flutter package wraps the PNLight iOS SDK. Do not call PNLight SDK methods on unsupported platforms.