Lovable iOS app: what a Capacitor wrapper can and can’t do
Lovable builds web apps, not iOS apps. To get a Lovable app into the App Store, you wrap it in a native shell with Capacitor, outside Lovable, then build and submit that shell yourself. The wrapper is quick for screens, forms and sign-in. Anything that has to keep working after the user leaves the app, or that handles large files, needs native code, usually custom Swift that Lovable can’t compile, run or test.
What Lovable supports today
Lovable’s publishing FAQ is clear: publishing always deploys to a web URL, and there is no built-in flow that packages your project or submits it to the App Store. It offers two routes: make the site a progressive web app (installable from the browser, no store), or wrap it with Capacitor outside Lovable. It doesn’t generate React Native.
“Lovable mobile app” can mean two things: Lovable’s own app for building projects from your phone, or a mobile app built from your project. This guide covers the second.
How a Capacitor wrapper works
Capacitor creates a real Xcode project whose main screen is a web view running your built web app. Plugins bridge the two sides: JavaScript calls a plugin method, and Swift code runs on the phone. For anything the official plugins don’t cover, Capacitor’s docs tell you to write your own plugin in Swift and register it in a custom view controller.
You have two ways to load the web app:
- Point the shell at your live URL. Every Lovable publish reaches the app instantly. But Capacitor’s docs say this setting is meant for live reload during development, not production, and Apple’s guideline 4.2 says an app should be more than “a repackaged website.”
- Bundle the built files inside the app. It opens instantly, and the screens load without a connection, though data still needs the network. Web changes only reach iPhones in a new App Store build.
A real example: a media delivery app
A founder built a media delivery app in Lovable: creators upload photos and video, and their clients view and download them. They shipped an iOS app by wrapping it with Capacitor 8. An early version that loaded the live site was rejected in review, so the app now bundles its web files.
The wrapper got them into the App Store fast. Then each heavy feature needed native code:
| Feature | Why the web view couldn’t do it | Native piece |
|---|---|---|
| Background uploads | iOS suspends the web view soon after the user leaves the app, and JavaScript stops with it | A background uploader on iOS’s system transfer service, which keeps sending while the app is suspended and wakes it when parts finish |
| Picking from Photos | Passing multi-gigabyte videos through JavaScript runs the phone out of memory | Native picker, export from the photo library and file copy straight to app storage |
| Crash-safe upload queue | Browser storage slows the screen with hundreds of jobs and isn’t built for crash safety | SQLite job storage that survives the app being killed |
| Clients saving galleries to Photos | Same background problem, in reverse | Background downloads into a named album, resuming after relaunch |
| Subscriptions | Apple’s guideline 3.1.1 generally requires in-app purchase for paid features | A StoreKit 2 bridge |
The background uploader alone has its own on-device queue, a reconciler that runs every 30 seconds to rescue stuck uploads and refresh upload links before they expire, a diagnostics log users can share from the phone, and a telemetry outbox that delivers key events even while the web view is suspended. Today the native side is eight custom plugins and about 29,000 lines of Swift.
One limit no native code gets around: if the user force-quits the app, iOS cancels its background transfers. The app has to notice on its next launch and pick up where it left off.
What real phones did to it
Real phones brought problems no browser test shows: files still downloading from iCloud, edited photos, full storage, dropped connections, and the app moving between foreground and background. Our article on large video uploads covers those fixes.
Memory was the hardest. iOS kills an app that uses too much memory, and the app sees no error. Upload monitoring showed the pattern:
| Video size | Uploads that crashed the app |
|---|---|
| Under 100 MB | 0.1% |
| 1–3 GB | 11% |
| Over 3 GB | 81% (13 of 16) |
On relaunch the app went straight back to the same video and crashed again. One creator’s app crashed 73 times in 45 minutes.
The main cause wasn’t the upload code. It was a diagnostic step: after copying each video, the app read the whole file in 1 MB steps to make a fingerprint for the logs, and iOS kept every step in memory until the read finished. On a 3 GB file, memory climbed until iOS killed the app, and after a relaunch the app had forgotten the fingerprint was done, so it started again.
The fix had five parts: skip the fingerprint for files of 500 MB or more, release memory after every step of any read loop, use smaller parts for files over 1 GB, upload one such file at a time, and pause any video after two crashes during its upload so a loop can’t repeat. A 3.15 GB video that had crashed the app then uploaded in 188 parts, with free memory flat at about 3 GB. On the old build, the same video took free memory down to about 1.1 GB before iOS closed the app.
How the web half and the native half stay in sync
Lovable edits the web code. The Swift lives in an ios-override folder in the same GitHub repo. Lovable can edit those files as text, but nothing in Lovable can compile them, run them on a phone, or show what iOS does to them.
The iOS app is built by a GitHub Actions workflow on a Mac runner, started from a button in the app’s admin page rather than on every push, because Mac minutes cost about ten times as much as Linux ones on GitHub’s pricing. Each run builds the web app, generates a fresh Xcode project with Capacitor, copies the override folder in, adds each file to the Xcode project, signs, archives and uploads to TestFlight. Web and native code from the same commit always ship together.
Every new Swift file has to be listed in the workflow and registered in the view controller. Miss one and the app builds fine but the plugin is missing on the phone, so the workflow fails early if a file isn’t compiled, registered and protected from being stripped out by the linker. Compile errors only surface in that build, so pure decision logic lives in separate types with its own tests, and everything that touches iOS is tested on a real phone through TestFlight.
Old app versions keep running
People don’t update promptly, and you can’t pull a version back off their phones. A bundled app keeps running its old web code and old Swift against your current backend, indefinitely.
So every upload change here goes behind a server-side switch whose default is the old behavior. The switch values are stored with each upload when it starts, so an upload in progress never changes behavior halfway. Phones on older builds ignore switches they don’t know about, and new behavior goes to the founder’s account first. The same problem showed up on the bill: old app versions kept listening for live updates to every change in the database, until we switched those updates off on the server.
When a wrapper is enough
A plain Capacitor wrapper is usually enough when:
- the app is screens, forms, lists and sign-in
- it only works while it’s on screen
- files are small (profile photos, documents)
- official plugins cover what you need (camera, push notifications, sharing)
You’ll need native plugins, and someone who can write and test Swift, when:
- uploads or downloads must continue after the user leaves the app
- users pick large videos or hundreds of files from Photos
- work must survive the app being killed or the phone restarting
- you sell subscriptions or paid features inside the app
- you need detailed diagnostics from real phones
What to set up before you submit
- An Apple Developer Program membership. It’s 99 USD a year. Companies need a D-U-N-S number, so start early.
- A build pipeline. Apple builds need Xcode, which runs only on a Mac. Use a Mac runner in CI, with your signing certificate, provisioning profile and App Store Connect key stored as secrets.
- TestFlight. Ship every build to TestFlight first and test on real, older iPhones. A build is testable for 90 days.
- Versioning. Keep one source of truth for the version. Once a version is approved, Apple won’t accept new builds under it, and builds under a stale number never reach users as an update. Have the build read the version from the repo.
- Backward compatibility. Decide how the backend will keep working for every app version still installed, before you ship the first one.
- Subscription rules. If you also sell on the web, the app must know where each subscription was bought. Otherwise web subscribers see a “Manage in App Store” button that leads nowhere, or an in-app purchase button that can charge them twice.
If your Lovable app needs an iOS version that does more than show the website, our Lovable rescue starts by working out which parts need native code and how to ship them safely.
