Skip to main content
The Courier iOS SDK gives you prebuilt UI components and Swift APIs. It handles authentication, token management, and real-time message delivery. This page is the iOS reference: what to install, how to configure Xcode, and the Swift API surface. Each flow is written once and applies to every platform. Available on GitHub.

Installation

In Xcode, go to File > Add Package Dependencies, paste https://github.com/trycourier/courier-ios, and pick Up to Next Major Version. 6.0.10 is the last version on CocoaPods. Newer versions ship through Swift Package Manager only.

Authentication

Courier authenticates with a JWT that your backend mints with your Courier API key, never in client code. Authenticate users is the full guide: the token flow, scope strings, reading auth state, signing out, and token refresh. Using the EU datacenter? See EU setup. Credentials persist across app sessions, so you sign in once per user rather than on every launch.

Inbox

Add an inbox is the setup flow. These are the types it uses on iOS. Every callback and action these expose is documented per platform in Data and actions.

Inbox theme

CourierInboxTheme is a constructor argument, and light and dark themes are separate.
Default InboxStyled Inbox

Default and styled Inbox on iOS

Branding from Courier Studio also applies. The SDK reads your brand’s primary color.

Push notifications

Set up push notifications is the setup flow, from connecting APNs to a device that receives push. It covers the CourierDelegate wiring, setAPNSToken and setToken, permission, and reading the payload on tap.
The iOS Simulator receives push on a Mac with Apple silicon, including delivery and taps. Test on a physical device before you ship.
The one piece of configuration that lives here is the extension target.

Notification Service Extension

iOS only wakes your app for a push while it is running, so delivery goes untracked when the app is closed. A Notification Service Extension runs instead, and reports the delivery for you.
1

Download the template

Download CourierNotificationServiceTemplate.zip and run sh make_template.sh.
2

Add the extension target

In Xcode: File > New > Target > select “Courier Service” > Finish.
3

Link the Courier SDK

Add the Courier_iOS library to the extension target. React Native and Flutter projects don’t have the package yet, so add it first: File > Add Package Dependencies, paste https://github.com/trycourier/courier-ios, and pick Up to Next Major Version. If the extension has pod 'Courier_iOS' in your Podfile, remove it.
Attach Mutable Content must be on for the APNs provider, or the extension never runs. It is on by default.

Preferences

Add a preference center is the setup flow. These are the types it uses on iOS.
Topics and sections are configured in the Preferences Editor. See Preferences Overview for how preference enforcement works at send time.

Preferences theme

Light and dark themes are separate, and Courier Studio branding applies automatically when you supply a brandId.

Default and styled Preferences on iOS

CourierClient

For advanced use cases, CourierClient is a low-level wrapper around the Courier API. Each client holds its own credentials, so you can spin up as many as you need.

Initialization

Token management

Inbox

Inbox websocket

Receive real-time updates across devices:

Preferences

Branding

URL tracking

Pass any tracking URL found inside a push notification payload or inbox message:
See the full Courier API reference at courier.com/docs/reference.