Shipping a Laravel App to iOS and Android with Capacitor
You do not always need React Native. If you already have a working Laravel app, Capacitor can get you into both app stores in days — with a few sharp edges worth knowing about first.
A client had a working Laravel web app and a two-week window to be in the App Store. Rewriting in React Native was not happening. Capacitor was.
What Capacitor Actually Is
Capacitor wraps your web app in a native shell and gives it a bridge to native APIs — camera, filesystem, push notifications, biometrics. Your Blade templates and JavaScript run inside a native WebView. It is not a rewrite; it is a wrapper with real native capability.
The Setup Is Genuinely Short
npm install @capacitor/core @capacitor/cli
npx cap init
npx cap add ios
npx cap add android
npx cap sync
The First Real Decision: Bundled or Remote
You can bundle your frontend into the app, or point the WebView at your live server. For a Laravel app driven by Blade, pointing at the server is far simpler — and it means server-side fixes ship instantly without an app store review. The cost is that the app needs connectivity to do anything.
The Sharp Edges
- Session cookies. The WebView origin differs from your domain. Set
SESSION_DOMAINandSANCTUM_STATEFUL_DOMAINScorrectly or logins silently fail on device but work in the simulator. - Safe areas. The iPhone notch will eat your header. Add
env(safe-area-inset-top)padding early rather than after your first TestFlight complaint. - The back button. Android hardware back does nothing by default. Wire it to your router or users will exit the app mid-form.
- File uploads. The Camera plugin returns a URI, not a File. You will convert to a Blob before posting.
Push Notifications
This is where most of the real work lives. Firebase for Android, APNs for iOS, a device-token table on the Laravel side, and a queued job to fan out sends. Budget more time here than for everything else combined.
Would I Do It Again?
For content-driven, form-driven and dashboard apps — every time. For anything with heavy animation, complex gestures or offline-first requirements, go native or React Native. Capacitor is a fantastic answer to a specific question: how do I get this working web app onto a phone, properly, quickly?