Push Notifications API (PushEngage, Pushwoosh, OneSignal, Firebase)
Send push notifications to your iOS app users with PushEngage (recommended), Pushwoosh, OneSignal, or Firebase — setup, deep links, and per-user targeting explained.
Last updated:
Push notifications reach your users even when your app is closed — for order updates, reminders, news, live tickers, or messages from your community. WebViewGold has native, built-in support for several push providers: you activate the provider you want in Config.swift and enter your IDs — no coding required. App users need an internet connection to receive remote push notifications.
If you do NOT want to use push notifications at all, open Config.swift and set askforpushpermissionatfirstrun to false, so the app does not ask for the notification permission.
Choose your push provider
Our recommendation: PushEngage
For most WebViewGold apps, we recommend PushEngage: one dashboard for iOS and Android with segments, automated campaigns, A/B tests, and analytics — plus the most complete JavaScript bridge in WebViewGold (subscriber ID, segments, and profile ID straight from your web app).
View PushEngage plans · Set up PushEngage in WebViewGold
All providers on this page are integrated natively and work the same way: activate the provider in Config.swift, enter your ID, build the app, and send notifications from the provider's dashboard or API. Every provider can pass its subscriber ID to your web app, so you can also target individual logged-in users.
| Provider | Activate in WebViewGold | Subscriber ID in JavaScript | Subscriber ID as URL parameter |
|---|---|---|---|
| PushEngage (recommended) | kPushEngageEnabled, pushEngageAppId | getpushengageid:// | ?pushengage_id= |
| Pushwoosh | kPushwooshEnable, Pushwoosh_APPID (Info.plist) | getpushwooshid:// | ?pushwoosh_id= |
| OneSignal | kPushEnabled, oneSignalID | getonesignalplayerid:// | ?onesignal_push_id= |
| Firebase Cloud Messaging | kFirebasePushEnabled, GoogleService-Info.plist | getfirebaseplayerid:// | ?firebase_push_id= |
| Local notifications (no provider) | — | — | — |
Partner link: the PushEngage links on this page are affiliate links. If you sign up through them, WebViewGold may receive a commission at no extra cost to you. All providers on this page remain fully supported.
Option 1: PushEngage remote push notifications (recommended)
PushEngage is a push notification platform for mobile apps and websites: audience segments, automated drip and triggered campaigns, A/B tests, and analytics are managed in one dashboard. WebViewGold integrates the official PushEngage SDK, so you only enter your App ID — no coding required.
Setup
- Create your iOS app in PushEngage. Create a PushEngage account (or sign in to the PushEngage dashboard), add your iOS app, and upload your Apple push (APNs) credentials. PushEngage explains every step in its iOS setup guide and its APNs certificate guide. Then copy the App ID of your app.
- Activate PushEngage in WebViewGold. Open Config.swift, paste your App ID into pushEngageAppId, and set kPushEngageEnabled to true:
static let pushEngageAppId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // your PushEngage App ID static let kPushEngageEnabled = true
- Build and run the app on a real device. The Push Notifications capability and the notification service extension (for images and action buttons) are already part of the WebViewGold Xcode project — just sign the app with your own team and bundle identifier.
- Send your first notification from the PushEngage dashboard.
Recommended: share an App Group with the notification extension. PushEngage uses an App Group so that the notification service extension can access the subscriber data of your app (required for delivery tracking). In Xcode, add the App Groups capability with the same group ID to the WebViewGold target and to the OneSignalNotificationServiceExtension target, then add this entry to the Info.plist of both targets:
<key>PushEngage_App_Group_Key</key> <string>group.com.yourcompany.yourapp</string>
Open a URL from a notification
Add a URL to your notification in the PushEngage dashboard: tapping the notification opens that URL inside your app.
PushEngage JavaScript APIs: subscriber ID, segments, and profile ID
Your web app controls PushEngage through simple URL calls — as a link or via window.location.href. All calls work on iOS and Android, so one web app can serve both platforms.
| URL call | What it does |
|---|---|
getpushengageid:// | Injects the subscriber ID of this device into your page as the JavaScript variable pushengage_subscriber_id. |
pushengage-register:// | Shows the native notification permission prompt and subscribes the user (like registerpush://). |
pushengage-add-segment://news,sports | Adds the subscriber to one or more segments (comma-separated). The segments must already exist in your PushEngage dashboard; names are case-sensitive. |
pushengage-add-profile://customer-123 | Links the subscriber to your own user or customer ID, so you can target a specific logged-in user. |
Read the subscriber ID, for example to store it with the logged-in user on your server:
<script>
window.location.href = "getpushengageid://";
setTimeout(function () {
if (typeof pushengage_subscriber_id !== "undefined" && pushengage_subscriber_id) {
console.log("PushEngage subscriber ID: " + pushengage_subscriber_id);
}
}, 1500);
</script>
Add the user to segments with a normal link …
<a href="pushengage-add-segment://news,sports">Follow news & sports</a>
… or link the subscriber to your own user ID after login:
<script>
window.location.href = "pushengage-add-profile://" + encodeURIComponent("customer-123");
</script>
Prefer to receive the ID on your server? Set kPushEngageEnhanceUrl to true in Config.swift to append ?pushengage_id=XYZ to your WebView URL: if your WebView URL is https://www.example.org, WebViewGold calls https://www.example.org?pushengage_id=XYZ instead. The parameter is added as soon as the subscriber ID is known (from the first app start after the user has subscribed) and only to the initial URL request, so save it in a session or cookie to use it on your linked pages.
Troubleshooting: set kPushEngageLogging to true to see the PushEngage SDK logs in the Xcode console while testing, and switch it back to false before you publish.
Option 2: Pushwoosh remote push notifications
Pushwoosh is a customer engagement platform for push notifications, in-app messages, and other messaging channels. WebViewGold integrates the official Pushwoosh SDK, so you only enter your Pushwoosh IDs — no coding required.
Setup
- Create your iOS app in Pushwoosh. Sign in to the Pushwoosh website, add your iOS app, and import your Apple push (APNs) credentials. Then copy the Application ID of your app.
- Activate Pushwoosh in WebViewGold. Open Config.swift and set kPushwooshEnable to true:

- Enter your Pushwoosh IDs. In the Info.plist file, replace the placeholder of Pushwoosh_APPID with your own Application ID (and Pushwoosh_API_TOKEN with your API token, if you use it):

- Build and run the app on a real device. Pushwoosh registers the device for push notifications at every app start.
- Send your first notification from the Pushwoosh dashboard:

Get the Pushwoosh device ID in your web app
Want to get each individual user's device ID for personalized push notifications or further processing? Retrieve it on any page via JavaScript — WebViewGold injects it as the variable pushwooshplayerid:
<script> window.location.href = "getpushwooshid://"; alert(pushwooshplayerid); </script>
Prefer to receive the ID on your server? Set kPushwooshEnhanceUrl to true in Config.swift to append ?pushwoosh_id=XYZ to your WebView URL: if your WebView URL is https://www.example.org, WebViewGold calls https://www.example.org?pushwoosh_id=XYZ instead. Only the initial URL request receives the parameter, so save it in a session or cookie to use it on your linked pages.

Option 3: OneSignal remote push notifications
OneSignal is a customer messaging platform for push notifications, in-app messages, email, and SMS. WebViewGold integrates the official OneSignal SDK, so you only enter your App ID — no coding required.
Setup
- Create your iOS app in OneSignal. Sign in to OneSignal, add an iOS (APNs) platform to your app, and connect it to Apple's push service with your .p8 key or push certificate. Then copy the App ID of your app.

- Activate OneSignal in WebViewGold. Open Config.swift, replace the placeholder of oneSignalID with your App ID, and set kPushEnabled to true:

- Build and run the app on a real device.
- Send your first notification from the OneSignal dashboard:

Open a URL from a notification
To open a specific URL when the user taps your notification, add it as a custom data field with the key url (do not use OneSignal's “Launch URL”). In the OneSignal dashboard, you find these key-value fields under “Advanced settings”; with the OneSignal REST API, add the url field to the data of your API request.
Set kPushOpenDeeplinkInBrowser to true in Config.swift if these URLs should open in Safari instead of your app.
Get the OneSignal subscription ID in your web app
Want to get each individual subscription ID for personalized push notifications or further processing? Retrieve it on any page via JavaScript — WebViewGold injects it as the variable onesignalplayerid:
<script> window.location.href = "getonesignalplayerid://"; alert(onesignalplayerid); </script>
Prefer to receive the ID on your server? Set kPushEnhanceUrl to true in Config.swift to append ?onesignal_push_id=XYZ to your WebView URL: if your WebView URL is https://www.example.org, WebViewGold calls https://www.example.org?onesignal_push_id=XYZ instead. Only the initial URL request receives the parameter, so save it in a session or cookie to use it on your linked pages. Set kPushReloadOnUserId to true to reload the WebView as soon as the app receives the ID from OneSignal.
Alternatively, set autoInjectVariable to true in Config.swift to inject this (and other) values into JavaScript automatically, without calling a URL first.
Option 4: Firebase Cloud Messaging remote push notifications
Firebase Cloud Messaging (FCM) is Google's free messaging service for sending notifications from the Firebase console or your own server. WebViewGold integrates the official Firebase SDK, so you only add your Firebase configuration file — no coding required.
Setup
- Create a Firebase project in your Firebase console.
- Register your iOS app with Firebase. On the project overview page, select the iOS icon (or Add app) and enter your app's bundle ID. You find it in Xcode: select the project name at the top of the navigator, open the General tab, and copy the Bundle Identifier (e.g., com.onlineappcreator.webviewgold). Enter the exact bundle ID of your app — this value cannot be changed after registration. The app nickname and App Store ID are optional and can be added later. Then click Register app.
- Download GoogleService-Info.plist and replace the placeholder file in your WebViewGold project with it.
- Activate Firebase in WebViewGold. Open Config.swift and set kFirebasePushEnabled to true.
- Upload your APNs key and sign your app. Generate an APNs key in your Apple Developer account, upload it in the Firebase project settings (Cloud Messaging), and sign your app with a provisioning profile that includes push notifications. Firebase explains this in its iOS setup guide.
- Build and run the app on a real device and send your first notification from the Firebase console.
To subscribe all users to a Firebase topic, set firebaseTopic in Config.swift to the name of the topic.
Open a URL from a notification
To open a specific URL when the user taps your notification, add it in the Firebase console under Additional options (optional) as a Custom data field with Key = "url" and Value = {the desired URL}.
Get the Firebase token in your web app
Want to get each individual subscription ID for personalized push notifications or further processing? Retrieve it on any page via JavaScript — WebViewGold injects it as the variable firebaseplayerid:
<script> window.location.href = "getfirebaseplayerid://"; alert(firebaseplayerid); </script>
Prefer to receive the ID on your server? Set kFirebaseEnhanceUrl to true in Config.swift to append ?firebase_push_id=XYZ to your WebView URL: if your WebView URL is https://www.example.org, WebViewGold calls https://www.example.org?firebase_push_id=XYZ instead. Only the initial URL request receives the parameter, so save it in a session or cookie to use it on your linked pages.
Alternatively, set autoInjectVariable to true in Config.swift to inject this (and other) values into JavaScript automatically, without calling a URL first.
Option 5: Local push notifications via JavaScript
You can schedule a notification from your website with a piece of JavaScript. The notification is scheduled while the app is open and shown at the chosen time — also after your app was closed. This works without any push provider.
<script> var title = "Your cart is waiting!"; //notification title var message = "You have left a cart full of dreams and deals behind. Dont leave it feeling abandoned"; //notification message var seconds = 120; //seconds from now on var url = "https://myshop.org/cart.php"; //deep-linking URL window.location.href = "sendlocalpushmsg://push.send?s="+ seconds +"=msg!"+ message +"&!#"+ title +"&!#"+ url +""; </script>
Use it for countdowns, happy hours, reminders, and similar situations. To cancel all scheduled local push notifications, run:
<script> window.location.href = "sendlocalpushmsg://push.send.cancel"; </script>
Option 6: bubble.io push notifications (OneSignal plugin)
Video tutorial: bubble.io push notifications with the WebViewGold OneSignal Push pluginPlays from YouTube when you press play- Create a bubble.io app.
- Install the WebViewGold OneSignal Push plugin:

- Follow the OneSignal instructions above and the plugin instructions (see the Bubble plugin page and the plugin video tutorial).
Push permission APIs: ask at the right moment & check the current status
Request the push notification permission manually (registerpush://)
By default, WebViewGold asks for the notification permission at the first app start (askforpushpermissionatfirstrun = true in Config.swift; this applies to PushEngage, OneSignal, Firebase, and the JavaScript API — Pushwoosh always registers at app start). Permission prompts convert better in context: set it to false and trigger the native prompt from your web app instead, for example after login or onboarding:
<a href="registerpush://">Enable notifications</a>
window.location.href = "registerpush://";
Check the current push permission status (checkNativePushPermissions://)
Call checkNativePushPermissions:// to check whether the user has granted the native iOS notification permission. The result is injected into your web app as the JavaScript variable nativePushEnabled (true or false) — useful, for example, to show your own hint linking to the app settings if notifications are disabled:
<script>
window.location.href = "checkNativePushPermissions://";
setTimeout(function() {
if (typeof nativePushEnabled !== "undefined" && !nativePushEnabled) {
// e.g., show a banner linking to settingsapp://
}
}, 500);
</script>

