Black Friday: up to 50% off Bifrost annual plans
Get the code by email
Blog

NativePHP Mobile 4.9.0 and mobile-ui 0.11.0

NativePHP for Mobile 4.9.0 is out, along with mobile-ui 0.11.0. You can pin the app to light, dark, or the system appearance at runtime, double-tap to zoom a photo, and there's a new <native:lazy-stack> for long lists that change often. mobile-ui 0.11.0 also fades a modal in and out and can grow a picture into it from the screen.

Upgrade with:

Copied!
composer require nativephp/mobile:^4.9 nativephp/mobile-ui:^0.11
php artisan native:install --force
php artisan native:run

composer update alone will not move nativephp/mobile-ui from a ^0.10 constraint to 0.11, because ^0.10 stops before 0.11.0. mobile-ui 0.11.0 requires nativephp/mobile ^4.9. composer update also leaves the native iOS and Android projects alone, so a lot of 4.9.0 only reaches your app after native:install --force.

Appearance#

System::setAppearance() pins the whole app to 'light', 'dark', or 'system' at runtime, including bars, sheets, and keyboards, and the choice survives relaunches (#733). When the effective appearance flips, AppearanceChanged still fires, so appearance(), theme(), and #[On(AppearanceChanged)] handlers catch up. Android needs API 31+; older versions keep following the device.

Copied!
use Native\Mobile\Facades\System;
 
System::setAppearance('dark');
System::setAppearance('system');

Gradients made of theme colours stay light in dark mode (#734).

Transition::Morph now runs for pushes inside native tabs and stacks (#709). A gesture area can zoom on a double tap with @doubleTap.zoom, and its scale is named zoom — :pinch, pinch-min, pinch-max, and @pinchEnd still work (#716, mobile-ui #220):

Copied!
<native:gesture-area :zoom="$zoom" zoom-min="1" zoom-max="4" @doubleTap.zoom="2"
:pan-x="$x" :pan-y="$y" bounded :content-ratio="$ratio">
<native:image :scale="$zoom" :translate-x="$x" :translate-y="$y" fit="contain" />
</native:gesture-area>

A double tap on content at whole size zooms to that scale, with the tapped point coming to the middle as far as bounded allows. A double tap on already-zoomed content takes it back to whole size. Drags can glide after the finger lifts, and a drag the area can't use is handed to its parent, so a photo pager can keep its pans bound. A snapping pan springs back when the finger rests before letting go (mobile-ui #223).

On iOS, soft Liquid Glass is drawn behind a bottom bar that carries glass (#710). The glass class accepts a /N opacity suffix (#735), and a bottom bar can ask for iOS 26's scroll edge effect (#741).

The tab bar still hides on a pushed screen by default, including on Android (#757). TabBar::hideOnPush(false) — or hide-on-push="false" on <native:bottom-nav> — keeps it on both platforms. A single screen can also keep it with tabBarOptions()->hidden(false) (#767).

Sander (@sandermj) mapped slide_to_bottom on Android, so a sheet-style dismiss works there too (#683). An edge swipe at the root of an iOS stack entered from tabs now goes back (#644). The search tab's submit is sent to the screen's onSearchSubmit() (#721), and a deep link that matches no route stays on the current screen (#715).

Components and APIs#

A child component's async callback now runs against that child (#705). NavAction::subtitle() draws a subtitle under a menu row's label (#740), and imageShape() and checked() are there for menu rows too (#748). native:model bindings are read from the view variable directly (#694), and @change on the same element runs after the model is synced (#669). Each node's id and state are kept when an @if or a loop above it changes (#691). ValidatesInput gets wildcard validateOnly(), @nativeError with an error bag, and an upgrade to the skill (#689).

A real SF Symbol name is drawn as itself on iOS (#695). Layout changes can animate, and auto-scroll can animate and repeat (#736). Tab items can take a ref for UI tests (#768), including on a custom bottom nav (mobile-ui #236).

iOS and Android can boot PHP and run artisan without a screen (#688, #702).

mobile-ui 0.11.0#

New elements and features:

  • <native:lazy-stack>, a scroll view for long vertical lists that change often (#215). It supports gap-*, padding, background, content-padding, and shows-indicators. Rows added above the visible ones don't jump the scroll position. It leaves out separators, swipe actions, pull-to-refresh, row callbacks, and auto-scroll — use <native:list> when you need those.
  • A modal can fade in and out with transition="fade", and grow a picture into it from an image on the screen with morph-from and morph-to (#221):
Copied!
<native:image ref="thumb-{{ $photo->id }}" :src="$photo->url" fit="cover" />
 
<native:modal :visible="$viewing" transition="fade"
:morph-from="'thumb-'.$photo->id" morph-to="viewed-photo">
<native:image ref="viewed-photo" :src="$photo->url" fit="contain" class="w-full h-full" />
</native:modal>
  • Double-tap zoom, glide after a drag, and handing unused drags to a parent, on a gesture area (#220)
  • A picture and a tick in menu rows (#224), and a subtitle under a menu row's label (#228)
  • A multiline field can fill its height and report where its caret is drawn (#227)
  • Scroll view rows can animate, and auto-scroll can animate and repeat (#225)
  • Pagers, lists, and scroll views sit right beside a side bar on iOS, with a header-beside option (#217)
  • A picked date can be cleared from inside the field (#204)
  • Remote images are cached and downsampled, with a revalidate opt-out (#235)

The modal close button gets a VoiceOver name on iOS and correct Material placement on Android (#214). An Android bottom sheet comes back up when it's shown again mid-hide (#219). The iOS build is fixed on Xcode 27.0 (#222).

Performance and builds#

PHP binaries move to 4.2.2, and PHP 8.6 is accepted (#722, #726, #732). The app bundle is smaller (#763). Compiled PHP is kept between launches with opcache's file cache (#764). Background PHP runtimes boot only when there is work for them (#754), and iOS AsyncTaskExecutor slots boot lazily on first dispatch (#749). Per-node overhead in EDGE Blade collection and tree serialization is cut (#745). Subtree memo no longer sends REUSE markers for nodes the phone never received (#699, #730).

The unpacked app is excluded from iOS backups (#708). The unused php_sessions folder is dropped on Android (#720). Debug logging stays out of release builds (#761). Plugins can no longer replace elements and renderers they don't own (#723).

App Review, OTA, and the escape hatch#

4.9.0 stops shipping two things that were showing up in App Review even in apps that never used them (#660).

The three-finger escape-hatch gesture is gone from core. It only ever served Jump, and it now lives in Jump itself. Regular apps never needed it, and the recognizer is no longer in the iOS release binary.

The path that applies a downloaded OTA payload is only compiled in when the app has the nativephp/mobile-ota plugin. If you use that plugin, the next build picks the flag up automatically. If you don't, that code isn't in the iOS release binary.

Fixes worth calling out#

  • Android lazy lists and pagers in native tabs and stacks no longer crash on scroll since #709 (#770)
  • A leftover hot reload signal no longer crashes Android cold starts (#618)
  • The iOS search tab stays separate when built with Xcode 27 (#719)
  • Android safe-area also pads the side system bars and cutout (#758), and a search field under a titled top bar keeps clear of the side insets (#759)
  • The top-bar search field draws on Android tab screens (#697)
  • Native events that land while a screen transition resets the queue are kept (#738)
  • The iOS APP_KEY stays accessible on a locked background launch (#747)
  • The app name is escaped before it is written into android:label (#739)
  • curl_close(), deprecated in PHP 8.5, is dropped (#717)
  • native:make-test keeps sub-folders (#718)

Full changelog#

  • Runtime appearance: System::setAppearance() (#733)
  • Double-tap zoom on a gesture area (#716, mobile-ui #220)
  • <native:lazy-stack> (mobile-ui #215)
  • Fade a modal and grow a picture into it (mobile-ui #221)
  • Morph transitions inside native tabs and stacks (#709)
  • Liquid Glass behind iOS bottom bars; glass opacity suffix (#710, #735)
  • Keep the tab bar on pushed screens (#767)
  • OTA apply gated to the OTA plugin; Jump escape hatch moved out of core (#660)
  • PHP binaries 4.2.2, PHP 8.6, smaller bundle, opcache file cache (#722, #763, #764)

Mobile 4.9.0 full changelog · Mobile 4.9.0 release · mobile-ui 0.11.0 full changelog · mobile-ui 0.11.0 release

Thanks to Simon Hamp, Wojt Janowski, SRWieZ, Sander (@sandermj), Filip Krzyżanowski (@fkrzski), Shruti Balasa (@shrutibalasawebdev), @kerkness, @cmcmanus96, @theluckystrike, @hbenabdallah, @prateekbhujel, and @shanesmithdev.

Welcome to the first-time contributors named in these releases: @kerkness, @cmcmanus96, @theluckystrike, @hbenabdallah, @prateekbhujel, and @shanesmithdev.