Push Notifications for AI-Built Apps on iOS and Android

Add push notifications to an AI-built app converted for iOS and Android: APNs and FCM setup, linking devices to users, triggers and testing.

Short answer

Once an AI-built web app is wrapped as a native iOS and Android app, push notifications run through Apple Push Notification service and Firebase Cloud Messaging, usually via a push provider. The work is connecting three things: the native app that registers the device, your backend that knows which user owns it, and the events that should trigger a message.

On this page
  1. Why push is the feature that changes everything
  2. The architecture in one picture
  3. Step 1: enable push in the native shell
  4. Step 2: link devices to your users
  5. Step 3: decide what triggers a notification
  6. Step 4: send from your backend
  7. Step 5: consent, preferences and privacy
  8. Step 6: test like a reviewer
  9. Common problems and their causes
  10. When you need more than notifications
  11. FAQ
  12. Tools from the jocapps ecosystem

Why push is the feature that changes everything

Push notifications are often the main reason a company wants an app instead of a website. They bring users back, they make B2B workflows faster (approvals, status updates, new messages), and on iOS they are one of the clearest signals to Apple's reviewers that an app does more than a website.

For apps built with Lovable, Bolt, Base44, Replit or a coding agent, there is a catch: the builder produces a web app, and web apps cannot send native push on their own in a store app. The native shell has to do it, and your backend has to tell it when.

The architecture in one picture

A working setup has four pieces:

PieceResponsibilityTypical choice
Native appAsk permission, obtain the device token, show notifications, open the right screenNative shell around your web app
Push providerStore tokens, target users or segments, deliver via Apple and GoogleOneSignal, Firebase Cloud Messaging, or similar
Your backendKnow which user is logged in on which device, decide when to sendSupabase Edge Function, Firebase function, your API
Platform servicesActually deliver to devicesAPNs (Apple), FCM (Android)

The AI builder only ever touches the third piece. The rest is configuration.

Step 1: enable push in the native shell

With WebViewGold, push support is built into the iOS and Android templates. You enable it in the configuration, add your push provider credentials and build. The template handles the permission prompt, token registration, displaying notifications and opening a URL inside your web app when a notification is tapped. No native code needs to be written, which matters if your team works entirely through AI builders.

On the platform side you need:

  • iOS: an Apple Developer account, the Push Notifications capability on the app identifier, and an APNs authentication key uploaded to your push provider.
  • Android: a Firebase project with your app's package name, with the configuration file added to the Android project. Android 13 and later also require a runtime notification permission, which the template requests.

A device token alone is anonymous. To send "your report is ready" to the right person, the push provider must know which user is logged in on which device. The usual pattern:

  1. The user logs into your web app inside the native shell.
  2. The web app tells the native layer the user's ID through a JavaScript bridge or by calling a URL scheme the template understands.
  3. The native layer registers that ID with the push provider as an external user ID or tag.
  4. On logout, the web app clears the association.

This is a small change in the web app, and a good task for your coding agent or builder: "After successful login, call the app bridge with the user ID; on logout, clear it. Only do this when running inside the app." Review the result, especially that it does not expose other data.

Step 3: decide what triggers a notification

Start with three to five events that users genuinely want to know about. For AI-built apps typical candidates are:

  • A long-running AI job finished (report generated, image created, document analysed).
  • Someone replied, commented or assigned a task.
  • An approval or action is waiting.
  • A booking, delivery or status changed.
  • A scheduled reminder the user set themselves.

Avoid marketing pushes at first. They drive opt-outs and, in the EU, may need separate consent.

Step 4: send from your backend

Your backend calls the push provider's API when an event happens. In a Supabase-based app (common with Lovable and Bolt), that typically means a database trigger or webhook that invokes an Edge Function, which in turn calls the push provider with the target user ID, a title, a message and a URL to open. In Firebase-based apps, a Cloud Function does the same.

Keep the push provider's API key on the server only, never in the web app. Log every send with the user, event and result, so you can answer "why did I not get a notification?" later.

  • Ask for permission at a meaningful moment, after explaining the benefit, not on first launch before the user has seen anything.
  • Offer per-category settings in the web app (for example, comments yes, weekly summary no) and respect them in the backend before sending.
  • Do not put sensitive personal data in the notification text; it appears on lock screens.
  • Mention the push provider in your privacy policy and in the App Store privacy details and Google Play data safety form.

Step 6: test like a reviewer

  1. Install builds via TestFlight and Play Console internal testing; push behaviour in development builds can differ from production.
  2. Test with the app in foreground, background and fully closed.
  3. Tap each notification type and confirm it opens the right screen, including when the user has to log in first.
  4. Test logout and login with a different account on the same device; the first user must stop receiving notifications.

Our guide to TestFlight and Play Console internal testing covers distributing these builds.

Common problems and their causes

  • Works on Android, nothing on iOS: APNs key missing, wrong environment, or capability not enabled for the bundle ID.
  • Everyone gets everyone's notifications: sending to all subscribers instead of a specific user ID.
  • Tapping opens the home page: the notification payload has no URL, or the web app's router does not handle deep links after login.
  • Users stop receiving after a while: stale tokens never cleaned up, or the user ID association lost after an app update.

When you need more than notifications

Rich notifications with images, action buttons, notification grouping or silent background updates go beyond what most wrappers need. If your roadmap includes these and other deep native features, apprat.io builds and maintains native iOS and Android functionality with AI-assisted development plus human developer hours. For the majority of AI-built apps, though, WebViewGold plus a clean backend trigger covers what users and reviewers expect.

Related reading: converting a web app into iOS and Android apps and Apple Guideline 4.2 for web-based apps.

FAQ

Can a Lovable or Bolt app send push notifications?

Not natively as a web app inside the app stores. Wrap it in a native shell that supports push, link the logged-in user to the device, and trigger notifications from your backend.

Do I need Firebase for push notifications on iOS?

No. iOS uses Apple Push Notification service. Many push providers, including Firebase Cloud Messaging, can deliver to both platforms, but Firebase is not required for iOS.

Are web push notifications on iOS an alternative?

Web push works on iOS only for web apps added to the home screen, which most users never do. A native app gives far more reliable reach.

Do push notifications help pass Apple review?

They are one of the native features that show an app offers more than a website, especially when tied to real user events. They are not a guarantee on their own.

Tools from the jocapps ecosystem

Want this done right, and fast?

Talk to our AI Code Engineers and AI architects. In a free 30-minute call we look at your idea, prototype or roadmap and tell you honestly what it takes to ship it.

24/7 call support in English and German.

Free call

Free intro call

Tell us which task an AI agent should take responsibility for. We show how our platform, AI Code Engineers and operations plug into your stack.

  • 30 minutes, no obligation
  • Honest feasibility check
  • Concrete next step
Rather talk now? 24/7 call support in English and German+49 761 519 751 50