JSPM

  • Created
  • Published
  • Downloads 22316
  • Score
    100M100P100Q174841F
  • License MIT

The OneSignal Expo plugin allows you to use OneSignal without leaving the managed workflow. Developed in collaboration with SweetGreen.

Package Exports

  • onesignal-expo-plugin

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (onesignal-expo-plugin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Welcome to onesignal-expo-plugin 👋

Version Documentation Maintenance License: MIT Twitter: onesignal

The OneSignal Expo plugin allows you to use OneSignal without leaving the managed workflow. Developed in collaboration with SweetGreen.

🏠 Homepage

Install

expo install onesignal-expo-plugin

Note: this does not install the OneSignal SDK.

Configuration in app.json / app.config.js

Plugin

Add the plugin to the plugin array:

{
  "plugins": [
    [
      "onesignal-expo-plugin",
      {
        "mode": "development"
      }
    ]
  ]
}

or

export default {
  ...
  plugins: [
    [
      "onesignal-expo-plugin",
      {
        mode: process.env.NODE_ENV || "development"
      }
    ]
  ]
};

OneSignal App ID

Add your OneSignal App ID to your Expo constants via the extra param:

Example:

{
  "extra": {
    "oneSignalAppId": "<YOUR APP ID HERE>"
  }
}

You can then access the value to pass to the setAppId function:

import Constants from "expo-constants";
OneSignal.setAppId(Constants.manifest.extra.oneSignalAppId);

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

OneSignal

📝 License

Copyright © 2021 OneSignal.
This project is MIT licensed.