User identity and callbacks
try await Pushctl.shared.logout() during sign-out. The installation remains anonymously subscribed. Login and logout throw when the installation is not registered or the API update fails.
Confirm background receipt and display
Without a Notification Service Extension, iOS limits what the main app can observe while it is not running. Add an extension for confirmed backgroundreceived and displayed events.
1
Add a Notification Service Extension target
2
Create an App Group
Enable the same App Group capability for the main app and extension.
3
Initialize with the group
4
Configure the extension
Add
PushctlAppGroupIdentifier with the same value to the extension’s Info.plist.Events are deterministic for installation, delivery, and type. If the extension and app see the same transition, the API treats both reports as one event.