Skip to content

Expo SDK quick start

Get started with the Pushwoosh Expo SDK using this quick and simple example

To integrate the Pushwoosh Expo SDK into your app, you will need the following:

Terminal window
# Clone the SDK repository and navigate to the example project
git clone https://github.com/Pushwoosh/pushwoosh-expo-plugin-sample.git
# Navigate to example directory
cd pushwoosh-expo-plugin-sample/
Terminal window
npm install

Open app/_layout.tsx and update the Pushwoosh.init call:

Pushwoosh.init({ pw_appid: "__YOUR_APP_CODE__", project_number: "__YOUR_FCM_SENDER_ID__" });

Where:

__YOUR_APP_CODE__ is the application code from the Pushwoosh Control Panel. __YOUR_FCM_SENDER_ID__ is the Firebase project number from the Firebase Console.

Open app.json and set:

  • package to your app’s package name.
  • bundleIdentifier to your app’s bundle ID.

Open your app.json file and set Pushwoosh Device API Token for both platforms:

  • PW_API_TOKEN device API token value for iOS platform.
  • apiToken device API token value for Android platform.
Terminal window
npx expo prebuild
  1. Install the dependencies:
Terminal window
cd ios/ && pod install
  1. Open xcworkspace file in Xcode.
  2. Sign the app in the “Signing & Capabilities” tab.

Android:

Terminal window
npx expo run:android

iOS:

Terminal window
npx expo run:ios

Go back to the Pushwoosh Control Panel and send a push notification to your registered device.