npm library usage
Use
Median, not median, with the npm packageWhen importing the Median JavaScript Bridge via the npm package, always use the capitalized Median object to access methods. The lowercase median is reserved for the injected JavaScript Bridge in native environments.To avoid semantic errors and enable intelligent code completion, ensure your IDE is configured to support type hinting for the Median object.Example: Importing and using Median in React
Example commands
The following methods are available when using themedian-js-bridge npm package:
Check if running in a native app
Retrieve the current platform
OneSignal example demonstrating login and oneSignalId retrieval
Use the following example to integrate OneSignal with Median, sign in a user, and retrieve the oneSignalId.