Home: Roshan Kc

← All posts

PHP · Laravel · Mobile 7 min read

NativePHP in 2026: Building iOS, Android and Desktop Apps with Laravel

Direct answer: NativePHP is an open-source framework that lets Laravel developers build iOS, Android, macOS, Windows and Linux apps from one PHP codebase. It doesn't compile PHP to machine code: it ships a real PHP runtime inside the app. Since v4 (July 2026), its SuperNative renderer turns Blade into genuine SwiftUI and Jetpack Compose views instead of a web view.

I get asked about NativePHP more than any other "PHP on a phone" project, usually by founders who have a Laravel web app and a budget for exactly zero extra mobile engineers. This post is what I tell them: what NativePHP actually is in late 2026, what changed with v3 and v4, and where I think it fits against Flutter and React Native. If you're comparing it with the PHP compilers that also say "native", start with elephc vs TypePHP vs NativePHP; they solve different problems.

What is NativePHP?#

NativePHP is a set of Laravel packages that wrap your app in a native shell and give it access to device features. There are two products:

  • NativePHP for Mobile (nativephp/mobile): iOS and Android. PHP is compiled as a library (libphp) and linked into a Swift shell on iOS and a Kotlin shell on Android.
  • NativePHP for Desktop (nativephp/desktop): macOS, Windows and Linux, built on Electron.

The part most people miss: there is no server. The mobile docs put it plainly: "There's no server in a NativePHP app, and no separate PHP process either." The PHP engine boots inside the app process, loads your Laravel app from the bundle, and stays warm. The bundled database is SQLite. As of v4 the mobile runtime ships PHP 8.4, cross-compiled for iOS (device and simulator) and Android ARM64.

So your Eloquent models, queues, validation rules and Blade views run on the phone. That's the whole pitch, and it's a good one if you already think in Laravel.

What changed in 2026: v3 went free, v4 went native#

DateReleaseWhat it means
Oct 14, 2025Desktop 2.0.1Desktop v2 merged the old nativephp/laravel and nativephp/electron repos into nativephp/desktop, with breaking changes and safer defaults.
Feb 1, 2026Mobile v3, MIT licenceThe core framework and nine plugins (Browser, Camera, Device, Dialog, File, Microphone, Network, Share, System) became free and open source. Versions before v3 stay under the Business Source License.
Jul 30, 2026Mobile v4 + SuperNativeLaunched at The Vibes in Boston, the day after Laracon US. Blade renders as real SwiftUI and Compose views by default.
Aug 7, 2026Mobile v4.1Added TreeObservers for watching the element trees the runtime publishes.
Nov 10, 2026Desktop 2.5.0Upgraded to Electron 45; apps can ask before downloading updates; the local events endpoint now requires authentication.

The MIT switch matters more than it sounds. A BSL licence makes agencies nervous because you're betting client work on a vendor's future terms. MIT removes that conversation. NativePHP still earns money: premium plugins (Biometrics, Geolocation, Push Notifications via Firebase, Scanner, Secure Storage) are one-time purchases, and the Bifrost cloud build service is a subscription. You can ship a real app without paying anything, though.

How SuperNative works#

SuperNative replaces the web view with native UI. Earlier NativePHP Mobile versions rendered your Blade into HTML and showed it in a web view, which worked but felt like a website in a wrapper. In v4, Blade compiles to a compact binary description of the screen, and native code turns that into SwiftUI or Jetpack Compose views.

The pipeline, from NativePHP's renderer docs:

  1. Your PHP code produces an element tree.
  2. The Element Runtime, native code built into the PHP runtime, encodes it into a binary frame of fixed-layout records.
  3. Because PHP and the UI share one process, publishing a frame is just writing bytes into shared memory. No JSON, no HTTP round trip.
  4. Small Swift and Kotlin readers diff each frame against the last and hand only the changes to SwiftUI or Compose.

Layout is a native flexbox implementation on both platforms, and you style with Tailwind-like classes. Gestures, press feedback and animations run on the native side, so PHP isn't in the hot loop for every frame of a swipe. The component set is called EDGE (Element Definition and Generation Engine). A screen looks roughly like this:

<column class="p-4 gap-2">
    <text class="text-xl font-bold">Orders</text>
    @foreach ($orders as $order)
        <pressable @tap="open({{ $order->id }})">
            <text>{{ $order->reference }}</text>
        </pressable>
    @endforeach
</column>

That's still Blade. You keep @foreach, components and attributes like #[Computed] and #[Lazy]. Web views haven't gone away, either: there's a <webview> element, so you can keep an existing Livewire screen and rebuild the important ones natively over time. I like that a lot. It means migration can be gradual instead of a rewrite.

Upgrading from v3 is mostly additive. The one breaking change Laravel News reported: the Device, Dialog, File and System plugins moved into core, so you uninstall the standalone packages before bumping to ~4.0.0.

NativePHP vs Flutter vs React Native#

The honest answer is that NativePHP wins on team fit, not on raw capability. Flutter and React Native have a decade of production apps, huge component ecosystems and big-company backing. NativePHP has Laravel developers.

NativePHP Mobile v4FlutterReact Native
LanguagePHP (Laravel, Blade)DartJavaScript / TypeScript
UISwiftUI + Compose via SuperNative, or web viewOwn renderer, draws every pixelNative platform views
Business logicRuns on device in embedded PHPDart on deviceJS on device
Reuse from a Laravel web appModels, validation, services, Blade skillsAPI onlyAPI only
Ecosystem sizeSmall, growingVery largeVery large
LicenceMIT (v3+), paid premium pluginsBSDMIT

Where I'd pick NativePHP:

  • A Laravel agency whose clients want "an app too", and the team has no mobile developer.
  • A solo SaaS founder who wants a companion app (dashboards, approvals, field forms) without learning Dart.
  • Internal and B2B tools where offline-first SQLite and fast iteration matter more than pixel-perfect animation.

Where I wouldn't, yet:

  • Consumer apps where UI polish and motion are the product.
  • Apps that need a rare native SDK nobody has wrapped in a NativePHP plugin. You'll be writing Swift and Kotlin anyway.
  • Teams that already have strong Flutter or React Native engineers. Don't switch for the sake of PHP.

Things to think about before you start#

Your app code ships to the device. On a server, PHP source stays private. In a NativePHP app the Laravel code is bundled into the app package. Don't put secrets in it, and treat any API key in the bundle as public. That's true of every mobile framework, but PHP developers aren't used to thinking about it.

The phone is not your server. Queues, scheduled jobs and heavy work behave differently when the OS can suspend your app at any moment. Keep the heavy lifting on your real backend and sync.

SuperNative is new. It launched in July 2026. The architecture is sound, but expect rough edges in less common components. Keep a web view escape hatch for complex screens.

Desktop is a different stack. NativePHP Desktop is Electron with PHP inside, not SuperNative. Fine for internal tools, but it carries Electron's memory footprint.

Is NativePHP production ready?#

For the use cases above, yes. Mobile v3 and v4 and Desktop v2 are stable releases with regular point updates, an MIT core and a paying customer base funding development. For a consumer app competing on feel, I'd prototype the two or three hardest screens in SuperNative before committing.

NativePHP also isn't a performance tool. If your problem is slow PHP, look at runtimes like Octane and FrankenPHP or the AOT compilers covered in elephc vs TypePHP.

Frequently asked questions#

Does NativePHP compile PHP to native code?#

No. NativePHP bundles a real PHP runtime (PHP 8.4 on mobile) inside a Swift, Kotlin or Electron shell. Your PHP is interpreted on the device; only the UI is native when you use SuperNative.

Is NativePHP free?#

Yes for the core. NativePHP for Mobile v3 and later is MIT licensed, and nine plugins are free. Premium plugins such as Biometrics and Push Notifications are one-time purchases, and the Bifrost cloud build service is a subscription.

What is NativePHP SuperNative?#

SuperNative is the v4 renderer that turns Blade components into real SwiftUI views on iOS and Jetpack Compose views on Android. PHP writes a binary frame into shared memory and native readers diff it into the UI, with no web view.

Does NativePHP need a server?#

No. The Laravel app runs inside the app process with SQLite as the bundled database. Most real apps still talk to a backend API for shared data.

Should I use NativePHP or Flutter?#

Use NativePHP if your team is strong in Laravel and you're building companion, B2B or internal apps. Use Flutter or React Native if UI polish is the product or you already have mobile engineers.

Key takeaways#

  • NativePHP embeds a real PHP 8.4 runtime in iOS and Android apps (and Electron on desktop). Your Laravel code runs on the device with SQLite and no server.
  • Mobile v3 went MIT on February 1, 2026. The core and nine plugins are free; premium plugins and the Bifrost build service are paid.
  • v4 (July 30, 2026) made SuperNative the default: Blade becomes SwiftUI and Jetpack Compose through binary frames in shared memory, with web views still available.
  • Choose it for team fit: Laravel shops and solo founders shipping companion, B2B or internal apps. Flutter and React Native still win on ecosystem depth.
  • Your app code ships to users' phones, so keep secrets and heavy jobs on your backend.

Sources#

Thinking about a mobile app on top of your Laravel product? Get in touch.