Skip to main content
The iOS SDK supports iOS 15+ and Swift 6.

Prerequisites

  • An iOS platform with matching APNs credentials and environment in Pushctl
  • A Client application token
  • The Push Notifications capability on the app target
Select Sandbox for a development-signed build installed from Xcode. Select Production for TestFlight and App Store builds. A mismatch commonly causes 400 BadDeviceToken. See the iOS FAQ.
Add https://github.com/Pushctl/Pushctl-iOS-SDK.git, choose a version from 0.3.0, and add the Pushctl product to the app target.
1

Initialize once

2

Request permission

Ask from a user-initiated point where the value of notifications is clear.
3

Forward the APNs token

4

Wait for confirmed registration

This returns only after the Pushctl API accepts the APNs token. It throws on APNs or API failure, or when no token arrives before the default 15-second timeout.
Do not disable another notification provider based only on permission or receipt of an APNs token. Wait for confirmed Pushctl registration first.