Lifecycle events
| Metric | When |
|---|---|
Delivered (.delivered) | Notification arrives (typically tracked in the Notification Service Extension) |
Opened (.opened) | User taps the notification |
Converted (.converted) | Available via trackMetric for custom conversion flows |
autoTrackPushEvents(true) (default) and a Notification Service Extension, delivery and opens are handled for you. Use ZixflowAppDelegateWrapper (APNs) for automatic open handling in the main app.
Payload fields the SDK reads
| Field | Purpose |
|---|---|
ZIXFLOW-Delivery-ID | Unique delivery ID for the campaign send |
ZIXFLOW-Delivery-Token | Device token the notification was sent to |
ZIXFLOW.push.link | Deep link URL (optional) |
ZIXFLOW.push.image | Rich push image URL (optional) |
Delivery tracking (Notification Service Extension)
Initialize the push module for the extension, then callMessagingPush.shared.didReceive:
MessagingPushFCM.initializeForExtension instead, then the same MessagingPush.shared methods.
Important: Share an App Group between the main app and the extension, and pass the same.appGroupId(...)(or rely ongroup.{bundleId}.zixflowinference).
Open tracking
Recommended: UseZixflowAppDelegateWrapper so opens are tracked automatically.
Manual: Forward the notification response to the SDK:
Zixflow.shared.trackMetric(deliveryID:event:deviceToken:).
App Groups checklist
- Enable App Groups on the main app and Notification Service Extension targets
- Use the same group ID (for example
group.com.yourcompany.app.zixflow) - Pass it to both main-app and extension push config via
.appGroupId(...)
Non-Zixflow pushes
If a notification is not from Zixflow (ZIXFLOW-Delivery-ID is missing), the SDK does not track delivery/open metrics for it. You can still record your own events:
Verify in the dashboard
- Enable
.logLevel(.debug)while testing - Send a test push to a physical device
- Confirm delivery and open metrics under Messaging → Push Notifications in Zixflow