Skip to main content

Adding Push Notifications to a Lovable or Base44 App

By the OnlineAppCreator editorial team4 min read

Short answer

Lovable and Base44 apps can send push notifications in two ways: web push for installed PWAs, which on iPhone only works after the user adds the app to the home screen, or native push through APNs and Firebase Cloud Messaging once the app is packaged for the stores. Native push is more reliable and reaches far more users, and a native shell can provide it without writing Swift or Kotlin.

On this page
  1. Web push or native push
  2. How native push works with a WebView app
  3. Step by step: from provider to first notification
  4. Permission timing and opt-in rates
  5. Notifications people keep enabled

Push notifications are often the first native feature users of a Lovable or Base44 app ask for, and they are one of the strongest signals for App Store reviewers that an app belongs on the phone. They are also easy to get wrong: notifications that never arrive, permission prompts that appear too early, or messages that reach the wrong user. This guide explains the technical options, how to connect a notification provider to an AI-built app and how to design notifications that people keep enabled.

Web push or native push

A web app can send notifications through the Web Push standard. On Android and desktop browsers this works reasonably well. On iPhone, web push is only available for web apps that the user has added to the home screen, on iOS 16.4 or later, and the permission must be requested after a user interaction inside that installed web app. In practice, few users take the add-to-home-screen step, so the reach of web push on iOS is limited.

Native push uses Apple Push Notification service (APNs) on iOS and Firebase Cloud Messaging (FCM) on Android. It requires a native app, which is exactly what you get once your Lovable or Base44 project is packaged for the stores. Native push works on every supported device, shows your app icon and name, supports rich content and lets notifications open a specific screen. If you plan to publish in the stores anyway, native push is the clear choice.

How native push works with a WebView app

Your app logic lives in the web app, but the push token lives in the native shell. The shell registers with APNs or FCM, usually through a provider such as OneSignal or Firebase, and receives a device identifier. That identifier must then be linked to the logged-in user of your web app, otherwise you can only send broadcast messages to everyone.

A native template like WebViewGold handles registration out of the box and can pass the user or device identifier to your web app, for example through a JavaScript call or a URL parameter, depending on the configuration. Check the current documentation for supported providers and the exact mechanism. Your Lovable or Base44 app then stores that identifier with the user record in the database, so your backend can target notifications precisely.

Step by step: from provider to first notification

  1. Create an account with a push provider and set up an app for iOS and Android.
  2. In the Apple Developer portal, create an APNs authentication key and upload it to the provider; in Firebase, create a project and add the Android app's package name.
  3. Enter the provider's app ID or configuration files in the native shell and enable push capability in Xcode.
  4. Ask Lovable or Base44 to create a small endpoint or function that saves the device identifier with the current user after login.
  5. Build a backend function that calls the provider's API to send a notification to a specific user when an event happens, such as a new message.
  6. Add a deep link to each notification so that tapping it opens the relevant screen.
  7. Test on real devices in foreground, background and terminated states.

Keep API keys for the push provider in server-side functions, for example Supabase Edge Functions for Lovable, never in frontend code. AI builders sometimes place keys directly in the client when asked to "send a notification", which exposes your account. If your team is learning how to prompt for secure patterns like this, our agentic coding workshops cover it.

Permission timing and opt-in rates

Both iOS and current Android versions require users to grant notification permission. You get one good chance: if the user declines the system prompt, re-enabling requires a trip to the settings app. Do not ask on first launch before the user understands the value. Show a short in-app explanation at a relevant moment, for example after the first booking ("Get notified when your appointment is confirmed?"), and trigger the system prompt only if the user agrees. Many native shells let you delay the prompt and trigger it from your web app.

Notifications people keep enabled

Users disable apps that send too much or too little of value. Use transactional notifications first: confirmations, replies, approvals, status changes and reminders the user asked for. Add marketing messages sparingly and let users control categories in your settings screen. Write notifications that make sense on a lock screen without context, start with the most important words and avoid sending at night in the user's time zone.

Notifications also affect store review and compliance. Apple does not allow push notifications to be required for the app to function and expects explicit consent for promotional pushes. Declare the data your push provider processes in the App Privacy section and in Google's Data safety form. For the wider store context, see our guides to publishing a Lovable app on the App Store and designing a Base44 app for mobile. Push is also one of the features that helps with Apple Guideline 4.2, as long as it serves users rather than marketing.

Frequently asked questions

Do web push notifications work on iPhone?

Only for web apps the user has added to the home screen on iOS 16.4 or later, and only after the user grants permission in that installed app. Native push through a store app reaches far more iPhone users.

Can I send push notifications to a specific user of my Lovable app?

Yes, if you link the device identifier from the native shell to the user record in your database. Your backend can then send targeted notifications through the push provider's API.

Do I need to write Swift or Kotlin for push notifications?

Not with a native template that includes push support. You configure the provider and capabilities, and the web app handles the user linking and sending logic.

Want this done right, the first time?

OnlineAppCreator takes products from idea to operation. Tell us where you stand and get a concrete plan in a free 15-minute call.