RORK LABJP
TOOLING — Rork's developer repos keep moving: rork-xcode was updated on July 16, rork-device on July 15, and rork-plist on July 13OPUS46 — Claude Opus 4.6 is live in Rork, and Rork Max is built to assemble apps on top of Claude CodeSIM — A cloud iOS simulator runs in the browser, with one click to install on a device and two clicks to publish to the App StoreMAX — Rork Max emits pure Swift rather than React Native, reaching iPhone, iPad, Apple Watch, Apple TV, Vision Pro, and even iMessageNATIVE — That opens up HealthKit, ARKit and LiDAR, NFC, Dynamic Island, Live Activities, 3D through Metal, and on-device inference with Core MLSEED — Rork raised a $15M seed led by Left Lane Capital, with Peak XV and a16z Speedrun joining the roundTOOLING — Rork's developer repos keep moving: rork-xcode was updated on July 16, rork-device on July 15, and rork-plist on July 13OPUS46 — Claude Opus 4.6 is live in Rork, and Rork Max is built to assemble apps on top of Claude CodeSIM — A cloud iOS simulator runs in the browser, with one click to install on a device and two clicks to publish to the App StoreMAX — Rork Max emits pure Swift rather than React Native, reaching iPhone, iPad, Apple Watch, Apple TV, Vision Pro, and even iMessageNATIVE — That opens up HealthKit, ARKit and LiDAR, NFC, Dynamic Island, Live Activities, 3D through Metal, and on-device inference with Core MLSEED — Rork raised a $15M seed led by Left Lane Capital, with Peak XV and a16z Speedrun joining the round
Articles/Dev Tools
Dev Tools/2026-04-09Intermediate

Rork × OneSignal: Supercharging Push Notifications in Your App

Learn how to integrate OneSignal into your Rork app for advanced push notifications — covering SDK setup, user segmentation, rich notifications, and delivery analytics.

OneSignal2push notifications11Rork515React Native209Expo149mobile notificationsuser engagementpush notification

Push notifications remain one of the most powerful tools for bringing users back to your app — when done right. Integrating OneSignal into a Rork-generated React Native / Expo app unlocks professional-grade segmentation, rich notifications, A/B testing, and a detailed analytics dashboard, all without building your own notification infrastructure from scratch.

OneSignal vs Expo Notifications: What's the Difference?

OneSignal is a third-party SaaS platform that manages push notifications across iOS, Android, and the web from a single dashboard. The free plan covers up to 10,000 push notifications per month — more than enough for most indie apps.

Here's how it stacks up against Expo Notifications (expo-notifications):

  • Dashboard: OneSignal provides a full GUI for creating, scheduling, and reviewing notification history. With Expo Notifications, everything is code-only
  • Segmentation: OneSignal lets you target users by tags, location, behavior, or last-session time through its UI. Expo Notifications requires you to implement your own filtering logic
  • Rich notifications: Image cards, action buttons, and emoji titles are all configurable directly from the OneSignal dashboard
  • Analytics: Delivery rate, open rate, and click-through rate are visualized out of the box
  • Simplified backend: You can send notifications directly from the OneSignal dashboard or via REST API — no dedicated notification server required

If you already use Expo Notifications but want more control over who gets notified and when — or if your team's marketing person needs to send campaigns without touching code — OneSignal is an excellent upgrade.

Prerequisites: What You'll Need

Before integrating OneSignal, make sure you have:

  • A Rork or Rork Max account with an active project
  • A free OneSignal account
  • An APNs Authentication Key for iOS (from Apple Developer Portal)
  • A Firebase Service Account JSON for Android (FCM v1)
  • Node.js 18 or later

To generate your APNs key, go to Apple Developer Console → Certificates, Identifiers & Profiles → Keys → Create a new key with "Apple Push Notifications service (APNs)" enabled. Download the .p8 file.

Step 1: Create a OneSignal App and Configure Platforms

Create a new app in the OneSignal dashboard

  1. Log in to OneSignal and click "New App/Website"
  2. Enter your app name and select "Mobile Push"
  3. Choose both iOS and Android for cross-platform coverage

iOS Configuration (APNs)

On the iOS Configuration screen:

  • Authentication Type: Token (recommended over certificate)
  • .p8 File: Upload your APNs key file (AuthKey_XXXXXXXXXX.p8)
  • Key ID: The 10-character ID shown in Apple Developer Console
  • Team ID: Your Apple Developer Team ID

Android Configuration (FCM v1)

OneSignal supports the FCM HTTP v1 API:

  1. Open your project in Firebase Console
  2. Go to Project Settings → Cloud Messaging → Firebase Cloud Messaging API (V1) → Enable
  3. Under Service Accounts, click "Generate new private key" and download the JSON file
  4. Upload this JSON file to OneSignal's Android Configuration section

After saving, OneSignal will provide you with an App ID (UUID format) and a REST API Key. Keep these handy.

Step 2: Integrate the OneSignal SDK in Your Rork App

Open your Rork project and prompt it with:

I want to add OneSignal to this project.
Please implement the following:
1. Install onesignal-expo-plugin and react-native-onesignal
2. Add the plugin configuration to app.json
3. Initialize OneSignal when the app starts
4. Add a button to request notification permission
5. Log the device push token to the console

Rork will generate the integration code, but here's what to verify manually:

app.json plugin configuration

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

OneSignal initialization code

Add this to your app entry point (App.tsx or _layout.tsx):

import OneSignal from 'react-native-onesignal';
 
// Call this once when the app starts
export function initOneSignal() {
  // Replace YOUR_ONESIGNAL_APP_ID with your actual App ID
  OneSignal.initialize('YOUR_ONESIGNAL_APP_ID');
 
  // Request permission to send notifications (shows iOS permission dialog)
  OneSignal.Notifications.requestPermission(true);
 
  // Handle notification clicks
  OneSignal.Notifications.addEventListener('click', (event) => {
    console.log('Notification clicked:', event.notification);
    // Add your navigation logic here
  });
}
 
// Expected behavior:
// 1. OneSignal initializes silently at app launch
// 2. iOS shows a system permission dialog on first run
// 3. Clicking a notification logs the payload to the console

Tagging users for segmentation

Tags are key-value pairs you attach to users. They power your segmentation logic later.

import OneSignal from 'react-native-onesignal';
 
// Call this after a user logs in or updates their profile
export function setUserTags(userId: string, plan: 'free' | 'premium') {
  OneSignal.User.addTag('user_id', userId);
  OneSignal.User.addTag('plan', plan);
  OneSignal.User.addTag('country', 'US');
}
 
// Expected behavior:
// - In the OneSignal dashboard under Audience → Segments,
//   you can now create a segment like: plan = premium
// - Use this to send exclusive notifications to paying users

Step 3: Build and Test

OneSignal requires a native build — it won't work in Expo Go. You'll need an Expo Development Build or a full production build.

# Create a development build via EAS
npx eas build --platform all --profile development
 
# Install on a physical device and launch the app
# Your device should appear under OneSignal Dashboard → Audience → All Users

Send a test notification

  1. Go to OneSignal Dashboard → Messages → Push → New Push
  2. Select "Send to Test Device" and enter your device's player ID (logged during app init)
  3. Enter a title and message, then send

Step 4: Build Real Campaigns from the OneSignal Dashboard

The real power of OneSignal shows up once your users are in the system.

Segment-based targeting

Go to Audience → Segments and create conditions like:

  • Premium users: plan = premium tag matches
  • Dormant users: Last Session more than 7 days ago (perfect for win-back campaigns)
  • New users: Created At within the last 3 days (for onboarding sequences)

Rich notifications (image + action buttons)

Under Messages → New Push → Add Media, paste an image URL. Recommended sizes:

  • iOS: 1200 × 630 px (2:1 ratio)
  • Android: 1200 × 630 px or square 400 × 400 px

Intelligent Delivery

OneSignal's Intelligent Delivery automatically sends each notification at the time a user is most likely to engage, based on their past app usage patterns. Toggle it on under the Delivery section — no extra code needed.

For advanced segmentation, A/B testing, and full automation pipelines, check out the Rork Push Notification Master Plan: Segment Delivery, A/B Testing, and Automation Guide.

Common Errors and Fixes

Issue: Notifications not arriving on iOS

Cause: APNs misconfiguration or provisioning profile mismatch.

Fix: Check OneSignal Dashboard → Audience → select your device → Device Errors. If you see InvalidToken or BadDeviceToken, regenerate your APNs key and re-upload it. Also verify your EAS build's provisioning profile matches your App ID.

Issue: Notification icon appears as a white square on Android

Cause: Android notification icons must be transparent PNGs (white/gray silhouette only). Color images are ignored by the system.

Fix: In app.json, point the notification.icon field to a transparent PNG:

{
  "expo": {
    "notification": {
      "icon": "./assets/notification-icon.png",
      "color": "#4F46E5"
    }
  }
}

Issue: App crashes in Expo Go after installing OneSignal

Cause: OneSignal uses native modules not available in Expo Go's runtime.

Fix: Use a Development Build. Run npx eas build --profile development and install the resulting .apk or .ipa on your device.

Wrapping Up

Adding OneSignal to your Rork app is one of the highest-leverage improvements you can make for long-term retention. You get a professional notification infrastructure without building or maintaining a server, a dashboard your whole team can use, and analytics to continuously improve your messaging strategy.

Start with the free tier, build your user segments with tags, and gradually introduce scheduled campaigns and Intelligent Delivery. Even small improvements to notification open rates can meaningfully boost your DAU and revenue.

Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

Dev Tools2026-07-15
The Comma That Fell to the Start of a Line: Rork, Quote Cards, and Japanese Line Breaking
React Native's Text component does not guarantee Japanese line-breaking rules. Here are the violation rates I measured, a WORD JOINER implementation that survives copy and VoiceOver, an onTextLayout audit harness, and how Rork Max (SwiftUI) differs.
Dev Tools2026-07-10
Adding React Compiler to Expo Let Me Delete 41 Hand-Written memo Calls
I enabled React Compiler on Rork-generated React Native screens and measured the rerender counts with Profiler. Here is how I decided which memo and useCallback calls were safe to delete, how to find the components the compiler bailed out on, and how to catch regressions in CI.
Dev Tools2026-07-07
The App Icon Badge Still Says 3 — Rebuilding Expo Badge Counts Around a Single Source of Truth
Why an Expo app's icon badge drifts out of sync with real unread counts and refuses to clear — and how to rebuild it around a single source of truth, with working recompute-and-sync code and the production pitfalls that bite you.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →