macOS App Setup
Instructions for adding OneSignal to your macOS app
Requirements
- OneSignal Account
- OneSignal App ID, available in Settings > Keys & IDs
Setup
Option 1: Mac Catalyst
If you built your app with Mac Catalyst, you can setup OneSignal's XCFramework SDK.
More details in this guide on our blog.
Option 2: API
OneSignal does not currently have a dedicated macOS SDK. However, OneSignal can be used to send notifications to macOS apps. Please refer to Apple's documentation to learn how to obtain a push token.
To register a macOS device, call our Create user endpoint with a subscription type
of macOSPush
to represent the macOS platform, and pass in the push token for the token
parameter.
Updating User Events
With the Create user or Update user APIs you can set your own custom alias or external_id
and update user data.
Send Messages
You can send push notifications using the OneSignal dashboard or Create notification API. More details, see Sending Push Messages.
Updated 3 months ago