Skip to main content

OneSignal Integration

OneSignal lets you add push notifications to your Newly app. Connect with one click and the AI sets up the SDK, notification components, and a preferences screen for you.
Push notifications are currently iOS only. Android support is coming soon. If you need Android push notifications now, reach out to us on Discord.

What is OneSignal?

OneSignal is a push notification platform that handles delivery, user segmentation, engagement tracking, and rich notifications (images, buttons, deep links).

Setting Up OneSignal

1

Open "More" in Newly and tap Push Notifications

Find the Push Notifications panel in the tool strip.
2

Press Connect OneSignal

Newly creates a OneSignal app and links it to your project automatically. No OneSignal account needed.
OneSignal connect panel
3

Sync your Apple credentials

If you’ve already added Apple credentials in Newly, press Sync Apple credentials to OneSignal to configure APNs for iOS push delivery.
4

Press "Add push notifications (AI)"

The AI will:
  • Add NotificationProvider to your app layout
  • Add a NotificationBell component to your home screen
  • Create a notification preferences screen
  • Configure your bundle identifier
5

Build and test

Create a native build and press Send test notification to verify everything works.
Push notifications only work in native builds. They will not work in the web preview or Expo Go.

What Gets Added to Your App

When you connect OneSignal and run the AI setup, three components are added:
ComponentPurpose
NotificationProviderWraps your app layout, initializes the OneSignal SDK, and handles permission prompts
NotificationBellA bell icon for your home screen that shows unread notification count
Notification PreferencesA screen where users can manage their notification settings

Sending Notifications

After setup, you can send notifications by asking the AI to set them up in your app logic. Newly manages the OneSignal connection for you.
Ask the AI to trigger notifications based on events in your app:
When a user completes a purchase, send them a
push notification thanking them for their order.

Common Patterns

Send a welcome push notification when a new user
signs up for the first time.

iOS Configuration

iOS requires APNs (Apple Push Notification service) credentials to deliver notifications. You’ll need to set up your Apple credentials in Newly first.
1

Set up Apple credentials

Open the Apple Credentials panel in Newly. You can either:
  • Automatic (recommended): Sign in with your Apple ID and Newly handles the rest
  • Manual: Upload your own .p8 APNs key file from the Apple Developer Portal
2

Sync to OneSignal

In the Push Notifications panel, press Sync Apple credentials to OneSignal. This sends your APNs credentials to OneSignal so it can deliver to iOS devices.
3

Verify

The panel will show APNs credentials detected when synced successfully.

Testing Notifications

  1. Create a development build of your app (not Expo Go)
  2. Install on a physical device or simulator
  3. Accept the push notification permission prompt
  4. Go back to the Push Notifications panel in Newly
  5. Press Send test notification
If the test notification doesn’t arrive, make sure APNs credentials are synced and that the app has notification permissions enabled on the device.

Best Practices

Don't Spam

Only send notifications users care about. Too many and they’ll uninstall.

Personalize

Use segments and user data to send relevant messages

Respect Preferences

Let users control which notifications they receive

Time It Right

Schedule notifications for when users are most likely to engage

Troubleshooting

  • Make sure you’re testing on a native build, not Expo Go or web preview
  • Check that the device has notification permissions enabled
  • Verify APNs credentials are synced in the Push Notifications panel
  • Add your Apple credentials in the Apple Credentials panel first
  • Then press Sync Apple credentials to OneSignal in the Push Notifications panel
  • If it still fails, double check your APNs Auth Key, Key ID, and Team ID
  • Make sure the app was opened at least once after installing the native build
  • Check that the user accepted the notification permission prompt
  • Ensure APNs credentials are synced
  • Try uninstalling and reinstalling the app, then send again
  • Check your internet connection
  • Try refreshing the page and connecting again
  • If it keeps failing, disconnect and reconnect OneSignal

Resources

OneSignal Docs

Official OneSignal documentation

Push Notification Guide

Best practices for push notifications

Next Steps

Deployment

Deploy your app with push notifications

RevenueCat

Add in-app purchases and subscriptions