macOS app setup
Learn how to integrate OneSignal into your macOS app, whether using Mac Catalyst or direct API access. Step-by-step guidance for configuring platforms, installing the SDK, and sending push notifications.
Configure your OneSignal app and platform
To send push notifications on macOS, your OneSignal app must be configured with Apple (APNs).
If your team already has a OneSignal account, ask to be invited as an admin role so you can configure the app. Otherwise, sign up for a free account to get started.
1. Create or select your app
- Select your app and go to Settings > Push & In-App.
- Or create a new app by clicking New App/Website.
Example shows creating a new app.
2. Set up and activate macOS platform
- Choose a recognizable app and organization name.
- Select (More Options) macOS as the platform to activate.
- Click Next: Configure Your Platform.
Example setting up your first OneSignal app, org, and channel.
3. Configure credentials
Follow the prompts to add either:
Example showing the p8 Auth Key configuration page.
Click Save & Continue after entering your credentials.
4. Save your App ID
You’ll be shown your OneSignal App ID — make sure to save it, as you’ll need it during setup.
Save your App ID for setup.
Setup
If your macOS app was built with Mac Catalyst, you can integrate our iOS SDK directly. Otherwise, you can leverage our APIs to manage users and notifications.
If you built your app with Mac Catalyst, you can integrate our iOS SDK directly.
If you built your app with Mac Catalyst, you can integrate our iOS SDK directly.
If you’re not using Mac Catalyst, or need full control, you can integrate via the OneSignal REST API.
Obtain a macOS push token
Follow Apple’s documentation to implement native push support and retrieve the APNs token from your macOS app.
Register a macOS Subscription with OneSignal
Call our Create user API to set the subscription
object:
type
ofmacOSPush
token
of the APNs token- Include all other user data, especially
external_id
to track the user in OneSignal.
Updating users
Use the Create user or Update user APIs with the external_id
to update user and subscription data.
macOS setup complete! Recommended next steps:
- Understand Users and Subscriptions
- Create message API to send notifications