Complete guide to implementing OneSignal push notifications for standalone Apple watchOS and Android Wear OS applications, including setup instructions and API integration.
Register for Remote Notifications
WKExtension
with the registerForRemoteNotifications
method. This generates the APNs push token specifically for the watch device.Handle Token Registration
WKExtensionDelegate
to capture the APNs push token using the didRegisterForRemoteNotificationsWithDeviceToken
method.Register Device with OneSignal
identifier
: The APNs push token generated by the watchdevice_type
: Set to 0
for iOS devicesexternal_user_id
: Unique identifier for the user who owns this subscriptiontest_type
: Required only when testing on development or ad-hoc buildsSend Notifications