Socket
Book a DemoInstallSign in
Socket

pushwoosh-expo-plugin

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pushwoosh-expo-plugin

Pushwoosh Expo config plugin

2.0.4
latest
Source
npmnpm
Version published
Weekly downloads
122
-20.26%
Maintainers
1
Weekly downloads
 
Created
Source

Expo Pushwoosh Push Notifications module

GitHub release npm license

platforms

SUPPORTED ENVIRONMENTS:

  • The Expo run commands (expo run:[android|ios])

INSTALL

You need both the pushwoosh-expo-plugin and the pushwoosh-react-native-plugin npm package.

npx expo install pushwoosh-expo-plugin

# npm
npm install pushwoosh-react-native-plugin

CONFIGURATION IN app.json / app.config.js

Plugin

Add the plugin to the front of the plugin array.

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

Plugin Prop

You can pass prop to the plugin config object to configure:

Plugin prop
moderequiredUsed to configure APNs environment entitlement. "development" or "production"

iOS Props

The following props can be configured under the ios key:

iOS propsRequiredDefaultDescription
PW_API_TOKENYes__YOUR_API_TOKEN__Your Pushwoosh API token for iOS. You can get the API token in the Pushwoosh control panel (Select an app -> "Settings" -> "API access"
Pushwoosh_LOG_LEVELNoINFOLog level for iOS. Possible values: NONE, ERROR, WARN, INFO, DEBUG, NOISE

Note: Remote notifications in Background Modes are automatically configured in the Signing & Capabilities section through the withEntitlementsPlist function. You don't need to manually configure this in Info.plist.

Android Props

The following props can be configured under the android key:

Android propsRequiredDefaultDescription
apiTokenYes__YOUR_API_TOKEN__Your Pushwoosh API token for Android. You can get the API token in the Pushwoosh control panel (Select an app -> "Settings" -> "API access"
logLevelNoINFOLog level for Android. One of: NONE, ERROR, WARN, INFO, DEBUG, NOISE
multiNotificationModeNotrueCan be changed to false in case you want to display only the last notification for the user
iconNo-Path to a custom notification icon for Android

Example Configuration

Here's an example of how to configure the plugin in your app.json:

{
  "expo": {
    "plugins": [
      [
        "pushwoosh-expo-plugin",
        {
          "mode": "development",
          "ios": {
            "PW_API_TOKEN": "YOUR_API_TOKEN",
            "Pushwoosh_LOG_LEVEL": "DEBUG"
          },
          "android": {
            "apiToken": "YOUR_API_TOKEN",
            "logLevel": "DEBUG",
            "icon": "./assets/notification-icon.png"
          }
        }
      ]
    ]
  }
}

Initialize Pushwoosh

import Pushwoosh from 'pushwoosh-react-native-plugin';


Pushwoosh.init({ 
    "pw_appid" : "YOUR_PUSHWOOSH_PROJECT_ID" , 
    "project_number" : "YOUR_GCM_PROJECT_NUMBER" 
});
Pushwoosh.register();

See Pushwoosh React Native integration

Prebuild (optional)

Prebuilding within Expo entails the generation of native runtime code for the project, resulting in the construction of the 'ios' and 'android' directories. Through prebuilding, the native modules that utilize CocoaPods, autolinking, and other configuration plugins are automatically linked and configured. You can conceptualize prebuild as a bundler for native code.

Executing expo prebuild initiates a custom managed workflow that combines the advantages of both bare workflows and managed workflows simultaneously.

Why is prebuilding recommended?

Prebuilding locally can be beneficial for inspecting changes in config plugins and assisting in the debugging of issues.

Running

npx expo prebuild

RUN

Executing the provided commands will prebuild and run your application. It's important to note that push notifications will not function in the iOS Simulator.


# Build and run your native iOS project
npx expo run:ios

# Build and run your native Android project
npx expo run:android

LICENCE

Copyright © 2024 Pushwoosh. This project is MIT licensed.

Keywords

react-native

FAQs

Package last updated on 07 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.