Skip to main content
Use @pnlight/sdk-react-native to add PNLight to a React Native app on iOS.

Install

Package page: @pnlight/sdk-react-native on npm. React Native SDK version

Initialize the SDK

Call initialize once when your app starts.
If you use Remote Config, pass local defaults as the third argument:

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.
By default, 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, call updateIdfa() after authorization so PNLight receives the granted IDFA.

Remote UI component

Use RemoteUiView to fetch and render a placement. Add an onAction handler so your app can respond to actions from that UI.

Remote UI props

Use Remote UI to learn how placements and actions work.