An open API service indexing awesome lists of open source software.

https://github.com/trycourier/courier-ios

Inbox, Push Notifications & Preferences for iOS
https://github.com/trycourier/courier-ios

apns apple-push-notifications courier fcm firebase-cloud-messaging ios notifications push-notifications swift

Last synced: 11 days ago
JSON representation

Inbox, Push Notifications & Preferences for iOS

Awesome Lists containing this project

README

          

ios-banner

# Courier iOS SDK

The Courier iOS SDK provides prebuilt UI components and Swift APIs for adding in-app notifications, push notifications, and notification preferences to your iOS app. It handles authentication, token management, and real-time message delivery.

## Installation

### Swift Package Manager

In Xcode, go to **File > Add Packages** and paste:

```
https://github.com/trycourier/courier-ios
```

### CocoaPods

```ruby
pod 'Courier_iOS'
```

Requires iOS 13.0+.

## Quick Start

```swift
import Courier_iOS

// Sign in the user (JWT generated by your backend)
Task {
await Courier.shared.signIn(
userId: "user_123",
accessToken: jwt
)
}

// Add a prebuilt Inbox view (SwiftUI)
CourierInboxView(
didClickInboxMessageAtIndex: { message, index in
message.isRead ? message.markAsUnread() : message.markAsRead()
}
)

// Add a prebuilt Preferences view (SwiftUI)
CourierPreferencesView(mode: .topic)
```

## Documentation

Full documentation: **[courier.com/docs/sdk-libraries/ios](https://www.courier.com/docs/sdk-libraries/ios/)**

- [Inbox Overview](https://www.courier.com/docs/platform/inbox/inbox-overview/)
- [Authentication](https://www.courier.com/docs/platform/inbox/authentication/)
- [Push Integrations](https://www.courier.com/docs/external-integrations/push/intro-to-push/)

# Getting Started

These are all the available features of the SDK.




Feature
Description





1



Authentication



Manages user credentials between app sessions. Required if you would like to use Inbox, Push Notifications and Preferences.




2



Inbox



An in-app notification center you can use to notify your users. Comes with a prebuilt UI and also supports fully custom UIs.




3



Push Notifications



Automatically manages push notification device tokens and gives convenient functions for handling push notification receiving and clicking.




4



Preferences



Allow users to update which types of notifications they would like to receive.




5



CourierClient



The base level API wrapper around the Courier endpoints. Useful if you have a highly customized user experience or codebase requirements.


# Example Projects

Several common starter projects using the SDK.



Project Link
UI Framework
Package Manager
Language






Example


UIKit
Swift
Swift

# **Share feedback with Courier**

We want to make this the best SDK for managing notifications! Have an idea or feedback about our SDKs? Let us know!

[Courier iOS Issues](https://github.com/trycourier/courier-ios/issues)

## EU endpoints

If your workspace uses EU-hosted Courier endpoints, pass the built-in EU preset through `apiUrls`.

```swift
Task {
await Courier.shared.signIn(
userId: "your_user_id",
accessToken: jwt,
apiUrls: .eu
)
}
```