Requirements
- iOS 13.0+
- Swift 5.7+
- Swift Package Manager
Install with Swift Package Manager
Package repository: pnlight-dev/sdk-swift.Initialize the SDK
Call initialization during app startup.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
UseRemoteUiView in SwiftUI when you want PNLight to render a configured placement.
getUIConfig. On the first app launch, wait 4-5 seconds after AppsFlyer initialization when attribution is required. The SDK also waits for attribution internally when attributionRequired is true.
getUIConfigResult when your app needs to tell the difference between no UI for a placement and a loading error.