Skip to content
WebViewGold Vibe Coding to App Store Get WebViewGold

Lovable + push notifications

Push notifications for your Lovable app

Browser web push on iOS is limited to installed home-screen web apps and gets ignored by most users. As a native app built with WebViewGold, your Lovable app gets the real thing: system push notifications on iOS and Android, sent from your backend or scheduled from your own JavaScript.

Three ways to notify your users

Remote push (OneSignal or Pushwoosh)

Send campaigns from a dashboard or trigger messages from your backend via their REST API. Segment users, schedule sends, track opens. WebViewGold ships with both integrations; you only paste your app IDs.

Local push from JavaScript

Schedule a notification from your web app with one URL call, for example a reminder in two hours or a cart recovery message. Works without any push service.

Permission at the right moment

Trigger the system permission dialog from a link (registerpush://) when the user has a reason to say yes, instead of on first launch. Check the permission state from JavaScript.

Set up push for a Lovable app

About 20 minutes for both platforms.

  1. Create a free OneSignal (or Pushwoosh) app

    Add an iOS app with your Apple push key (.p8 from the Apple Developer portal) and an Android app with your Firebase Cloud Messaging credentials. Both dashboards walk you through it.

  2. Paste the IDs into WebViewGold

    In Config.swift and Config.java (or the Cloud Builder) enable the push option and insert your OneSignal App ID. Decide whether to ask for permission at first launch or later via registerpush://.

  3. Identify users from your Lovable app

    WebViewGold exposes the push user ID to your web app as a JavaScript variable or appends it to your URL. Store it next to the user in Supabase or Lovable Cloud (Postgres, storage, edge functions) so your backend can target individual users.

  4. Send from your backend

    Call the OneSignal REST API from Supabase or Lovable Cloud (Postgres, storage, edge functions) (for example a Supabase edge function or a server route) whenever something happens: new message, order update, reminder. Or send campaigns manually from the dashboard.

  5. Deep-link the notification

    Attach a URL to each push; WebViewGold opens that page inside the app when the user taps the notification.

Local push: the JavaScript call

No push service needed. From your Lovable app, schedule a notification that fires even after the app is closed:

var title = "Your session starts soon";
var message = "Tap to open your dashboard.";
var seconds = 7200;                       // fire in two hours
var url = "https://yourapp.com/dashboard"; // opened when tapped
window.location.href = "sendlocalpushmsg://push.send?s=" + seconds + "=msg!" + message + "&!#" + title + "&!#" + url;

Cancel all scheduled notifications with sendlocalpushmsg://push.send.cancel. Ask Lovable to wire this into your reminder or notification settings screen; the full reference is in the iOS push documentation and the Android push documentation.

What to tell Lovable

  • Add a notification settings screen with an "Enable notifications" button that navigates to registerpush:// only inside the app (WebViewGold identifies itself via a custom user agent you define).
  • Read the push user ID that WebViewGold provides and save it on the user profile in Supabase or Lovable Cloud (Postgres, storage, edge functions).
  • Create a backend function that calls the OneSignal REST API with the user's push ID when an event happens.
  • Add a ?utm_source=push parameter to notification URLs so your analytics can attribute opens.

Frequently asked questions

Does web push from Lovable work inside the app?

Browser web push (service worker based) is not what the stores and users expect from an app. WebViewGold uses native APNs and FCM notifications, which show up in the system notification center, support badges and sounds, and work on every iPhone.

Is OneSignal free?

OneSignal has a free tier that covers most new apps; Pushwoosh offers WebViewGold customers two free months. Local push notifications are free and need no service at all.

Do push notifications help with App Store review?

Yes. Guideline 4.2 asks for functionality beyond a website; native push notifications are a concrete, user-facing native feature.

Can I send a push to one specific user?

Yes. Map the push user ID WebViewGold exposes to the user record in Supabase or Lovable Cloud (Postgres, storage, edge functions) and target that ID through the OneSignal API.

Ready to ship your Lovable app?

App Store & Google Play approval guarantee – or your money back within 14 days

Prefer to hand it over? Full Service: we configure, build and submit for $349. Questions? Chat with us 24/7.

Refunds are granted under the conditions listed in our FAQ: a non-content rejection by Apple and/or Google, claimed within 14 days after purchase.