macOS App Setup

Instructions for adding OneSignal to your macOS app

Required For Setup

macOS 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 OneSignal's [Add a Device POST /players] (https://documentation.onesignal.com/reference/add-a-device) with a device_type of 9 to represent the macOS platform, and pass in the push token for the identifier parameter.

Updating User Events

With the [Add a Device POST /players] (https://documentation.onesignal.com/reference/add-a-device) you can set your own custom external_user_id and update custom data (called Data Tags with the Edit tags with external user id.

Otherwise, you can save the OneSignal player_id provided in the response to update device data with Edit device or New session.