Overview
If you have a mobile-friendly website and want to convert it into a downloadable mobile app for the Apple App Store or Google Play Store, Median.co is a powerful solution. It also offers a seamless integration with OneSignal to enable push notifications.Setup
1. Create your app with Median.co
- Follow the Median.co Getting Started Guide.
- Build an app at <https://median.co/app>.
2. Set up OneSignal
- Go to onesignal.com and create an account.
- Configure your OneSignal App and Platform.
Configure your OneSignal app and platform
Required setup for push notifications To start sending push notifications with OneSignal, you must first configure your OneSignal app with all the platforms your support—Apple (APNs), Google (FCM), Huawei (HMS), and/or Amazon (ADM).Step-by-step instructions for configuring your OneSignal app.
Step-by-step instructions for configuring your OneSignal app.
Create or select your app
- To add platforms to an existing app, go to Settings > Push & In-App in the OneSignal dashboard.
- To start fresh, click New App/Website and follow the prompts.

Set up and activate a platform
- Choose a clear and recognizable name for your app and organization.
- Select the platform(s) you want to configure (iOS, Android, etc.).
- Click Next: Configure Your Platform.

Configure platform credentials
- Android: Set up Firebase Credentials
- iOS: p8 Token (Recommended) or p12 Certificate
- Amazon: Generate API Key
- Huawei: Authorize OneSignal
Choose target SDK

Install SDK and save your App ID

3. Link OneSignal to your Median app
Paste the OneSignal App ID into your Median.co (GoNative) app configuration.Testing the OneSignal SDK integration
This guide helps you verify that your OneSignal SDK integration is working correctly by testing push notifications, subscription registration, and in-app messaging.Check mobile subscriptions
Launch your app on a test device.
requestPermission method during initialization.
Check your OneSignal dashboard
- Go to Audience > Subscriptions.
- You should see a new entry with the status “Never Subscribed”.

Refresh the OneSignal dashboard Subscription's page.

Set up test subscriptions
Test subscriptions are helpful for testing a push notification before sending a message.Add to Test Subscriptions.

Name your subscription.
Name the segment.
Test Users (the name is important because it will be used later).Send test push via API
Get your App API Key and App ID.
Update the provided code.
YOUR_APP_API_KEY and YOUR_APP_ID in the code below with your actual keys. This code uses the Test Users segment we created earlier.Check images and confirmed delivery.

Check for confirmed delivery.


Send an in-app message
In-app messages let you communicate with users while they are using your app.Close or background your app on the device.
Create an in-app message.
- In your OneSignal dashboard, navigate to Messages > In-App > New In-App.
- Find and select the Welcome message.
- Set your Audience as the Test Users segment we used previously.

Schedule frequency.

Make message live.
- Gathering Subscriptions, setting Test subscriptions, and creating Segments.
- Sending Push with images and Confirmed Delivery using Segments and our Create message API.
- Sending In-app messages.
Prompt for push permissions
Instead of callingrequestPermission() immediately on app open, take a more strategic approach. Use an in-app message to explain the value of push notifications before requesting permission.
For best practices and implementation details, see our Prompt for push permissions guide.
FAQ
How can I access OneSignal data on the client side?
Use the Median Native JavaScript Bridge methodmedian_onesignal_info to retrieve the OneSignal Subscription ID (oneSignalUserId) and the subscription status.
How do I send deep link push notifications to my Median app?
Median apps use deep linking for a native experience instead of opening a pop-up browser.When using OneSignal dashboard:
- Do not use the Launch URL field.
- Instead, use the Additional Data field.
- Add a key:
targetUrl(capital “U”) - Add a value: the URL you want users to open.
- Add a key:

When using the REST API:
IncludetargetUrl in the data object of your push payload. Example:
Sending to both web and mobile?
If you send to web and mobile simultaneously: In the Launch URL section, select “Different URL for web/app”. Leave the APP URL field blank to prevent override.


