OneSignal has updated from a device-centric model (Player ID) to a user-centric model (OneSignal ID). For migration guidance, refer to the User Model Migration Guide.For documentation on legacy device-centric implementations, see Version 9.
Overview
This document maps the methods, properties, and events from OneSignal’s legacy Player Model Web SDK to the newer User Model SDK. Each section includes matching TypeScript code examples, clearly demonstrating how to update your integration. All examples are simplified for demonstration purposes. For complete and up-to-date implementations, refer to the documentation links provided under each method or event.OneSignal Service Worker
Update the import in yourOneSignalSDKWorker.js
file:
Player Model:
importScripts
URL.
See OneSignal Service Worker for more information.