Skip to main content
Use 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:
Package page: pnlight_sdk on pub.dev. Flutter SDK version

iOS setup

If you use RemoteUiView, add the DivKit CocoaPods source to ios/Podfile before other sources:
If your app collects IDFA on iOS 14.0+, add 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, call updateIdfa() 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.