Skip to content

Commit b23e2ca

Browse files
simonhampshanerbaner82claude
authored
Docs updates (#420)
* docs(mobile/v4): Device/Dialog/File/System are now core built-ins These four APIs moved from standalone plugins into nativephp/mobile core. Add SuperNative reference pages for each — documented from the actual core source (the old plugin READMEs were stale) — remove the empty plugins/core stubs from the sidebar, and 301-redirect their old URLs to the new pages. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(mobile/v4): SuperNative feature docs — appearance, text, navbar, bottom-bar - Theming: "Appearance in PHP" — System::appearance()/isDarkMode(), the isDark()/isLight()/theme() helpers, and the AppearanceChanged event. - Text: inline <text> runs and select-text/select-none selection. - Layouts: NavBar::titleView()/logo() and keyboard-aware <native:bottom-bar>. - Text Input: cross-link to the keyboard-aware bottom bar. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(mobile/v4): release notes — core-plugin migration + Vite opt-in - Upgrade Guide: new "Upgrading To 4.0 From 3.x" — remove the mobile-device/ dialog/file/system plugins before upgrading; Vite dev server is now opt-in. - Changelog: Breaking Changes for both. - Commands/Development: document the --vite flag (Vite no longer auto-starts; pass --vite for JS/CSS HMR). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(mobile/v4): list select-text/select-none in class reference; note Composer conflict guard - Add the text-selection classes to the "Supported Tailwind classes" table. - Upgrade Guide: v4 declares a Composer conflict with the four ex-plugins, so the update hard-blocks until they're removed (clearer than "registers twice"). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(mobile/v4): add "Why SuperNative" rationale to the upgrade guide Frame the strategic shift: the web view tied the UI to upstream stacks we didn't own (Inertia 3 dropping axios, Livewire 4 emoji filenames breaking iOS builds). SuperNative is a stack we own end to end — PHP to SwiftUI/Compose. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(mobile/v4): correct Livewire 4 emoji-filename detail The breakage was our bundled PHP binaries initially failing to read the emoji (🔥) filenames, not the iOS packager rejecting them. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(mobile/v4): reorganize sections and make docs version-neutral - Move Architecture to just below Getting Started (before The Basics) - Move Device, Dialog, File and System from SuperNative into The Basics; place Dialog below Native UI - Remove version-specific phrasing ("in v4", "as of v4", "v3.1 introduces") so the docs port cleanly to future versions - Convert hard-coded /docs/mobile/3 and /docs/mobile/1 links to relative, version-portable paths Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(mobile/v4): restructure sections, split publishing, wire redirects - Rename Concepts → Digging Deeper; move SuperNative page into Architecture - Move Routing (was Navigation) & Layouts into The Basics; Events → native-component content - Split deployment into a Publishing Your App section (Intro/Android/iOS) - Remove Roadmap and Architecture Overview; refresh Getting Started intro & upgrade guide - Add version-aware redirects (renamed_pages + routes) and tests Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(mobile/v4): move Vibe docs to Digging Deeper > WebSockets - Rename plugins/vibe to digging-deeper/websockets with plugin banner - Add Core Plugins shortcut stub redirecting to the plugin directory page - Wire renamed_pages redirect and update inbound Events link, add test Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Shane Rosenthal <srosenthal82@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 77a1cb9 commit b23e2ca

67 files changed

Lines changed: 1038 additions & 1236 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎config/docs.php‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,34 @@
5252
'mobile' => [
5353
4 => [
5454
'the-basics/native-components' => 'the-basics/native-ui',
55+
'the-basics/dialog' => 'the-basics/dialogs',
56+
'getting-started/deployment' => 'publishing/introduction',
57+
'plugins/vibe' => 'digging-deeper/websockets',
58+
59+
// Concepts section renamed to Digging Deeper
60+
'concepts/authentication' => 'digging-deeper/authentication',
61+
'concepts/databases' => 'digging-deeper/databases',
62+
'concepts/deep-links' => 'digging-deeper/deep-links',
63+
'concepts/push-notifications' => 'digging-deeper/push-notifications',
64+
'concepts/queues' => 'digging-deeper/queues',
65+
'concepts/security' => 'digging-deeper/security',
66+
67+
// SuperNative overview page now lives in the Architecture section
68+
'super-native/introduction' => 'architecture/super-native',
69+
70+
// Some SuperNative pages moved into The Basics
71+
'super-native/navigation' => 'the-basics/routing',
72+
'super-native/layouts' => 'the-basics/layouts',
73+
'super-native/events' => 'the-basics/events',
74+
75+
// Remaining SuperNative pages flattened into the Digging Deeper section
76+
'super-native/lifecycle-hooks' => 'digging-deeper/lifecycle-hooks',
77+
'super-native/data-binding' => 'digging-deeper/data-binding',
78+
'super-native/reactivity' => 'digging-deeper/reactivity',
79+
'super-native/theming' => 'digging-deeper/theming',
80+
'super-native/gestures' => 'digging-deeper/gestures',
81+
'super-native/search' => 'digging-deeper/search',
82+
'super-native/accessibility' => 'digging-deeper/accessibility',
5583
],
5684
],
5785
],

‎resources/views/docs/mobile/2/getting-started/deployment.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ the stores. You should consult the [App Store Connect Help](https://developer.ap
5252
[Play Console Help](https://support.google.com/googleplay/android-developer/?hl=en-GB#topic=3450769) documentation for
5353
detailed and up-to-date guidance on how to prepare your app submissions and listings.
5454

55-
If you want more hands-on support, we happily work with our [Partners](/partners) to support them releasing their apps.
55+
If you want more [hands-on support](/consulting), we happily work with our [Partners](/partners) to support them releasing their apps.
5656

5757
</aside>
5858

‎resources/views/docs/mobile/3/getting-started/deployment.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ the stores. You should consult the [App Store Connect Help](https://developer.ap
5252
[Play Console Help](https://support.google.com/googleplay/android-developer/?hl=en-GB#topic=3450769) documentation for
5353
detailed and up-to-date guidance on how to prepare your app submissions and listings.
5454

55-
If you want more hands-on support, we happily work with our [Partners](/partners) to support them releasing their apps.
55+
If you want more [hands-on support](/consulting), we happily work with our [Partners](/partners) to support them releasing their apps.
5656

5757
</aside>
5858

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
title: Architecture
3-
order: 80
3+
order: 10
44
---

‎resources/views/docs/mobile/4/architecture/about-the-new-architecture.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ title: About the New Architecture
33
order: 10
44
---
55

6-
Since v1, NativePHP for Mobile has run your Laravel app on the device itself — no server, no network round-trip. In
7-
v3 and earlier, your app's UI rendered as HTML inside a web view. That model is productive and familiar, and it's
8-
[still fully supported](../super-native/introduction#is-the-web-view-still-an-option). But it puts a browser between
6+
NativePHP for Mobile runs your Laravel app on the device itself — no server, no network round-trip. Traditionally,
7+
your app's UI rendered as HTML inside a web view. That model is productive and familiar, and it's
8+
[still fully supported](../architecture/super-native#is-the-web-view-still-an-option). But it puts a browser between
99
your app and the platform, and some things can only feel truly native when they *are* native.
1010

11-
The new architecture — [SuperNative](../super-native/introduction) — removes that layer entirely. Your screens are
11+
The new architecture — [SuperNative](../architecture/super-native) — removes that layer entirely. Your screens are
1212
real SwiftUI and Jetpack Compose views, created and updated directly by your PHP code. Here's why we built it, and
1313
what it changes.
1414

@@ -68,8 +68,8 @@ app faster. If your app is happy in the web view, it will keep working exactly a
6868

6969
## Should you use it today?
7070

71-
SuperNative is **the default** in v4: new apps render native screens from the very first route. It's in beta, so
72-
expect rapid iteration — and if you'd rather wait, [opting out](../super-native/introduction#is-the-web-view-still-an-option)
71+
SuperNative is **the default**: new apps render native screens from the very first route. It's in beta, so
72+
expect rapid iteration — and if you'd rather wait, [opting out](../architecture/super-native#is-the-web-view-still-an-option)
7373
is one route and one component.
7474

7575
Ready to go deeper? Start with [The Renderer](renderer).

‎resources/views/docs/mobile/4/architecture/glossary.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Definitions for the terms used throughout the Architecture section.
77

88
## SuperNative
99

10-
The engine behind native rendering in NativePHP for Mobile v4. It spans everything described in this section:
10+
The engine behind native rendering in NativePHP for Mobile. It spans everything described in this section:
1111
components, the render pipeline, the shared-memory boundary and the platform renderers.
1212
[About the New Architecture](about-the-new-architecture) is the best starting point.
1313

‎resources/views/docs/mobile/4/architecture/overview.md‎

Lines changed: 0 additions & 44 deletions
This file was deleted.
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
---
2+
title: SuperNative Introduction
3+
order: 5
4+
---
5+
6+
## What is SuperNative?
7+
8+
SuperNative is our name for a combination of technologies that enable PHP to produce platform-native UI at
9+
blistering speeds.
10+
11+
While SuperNative uses HTML-like syntax, **there is no need for a web view**. Your apps built with Blade
12+
can fully leverage the native components and performance of each platform's UI tools, directly from PHP — SwiftUI
13+
on iOS and Jetpack Compose on Android.
14+
15+
Your app's screens are not web views rendering HTML. They are real, platform-native views, built and
16+
updated by your PHP code. Same Laravel app, same Blade templates, two genuine native UIs.
17+
18+
You don't need to think about the right syntax for Android vs iOS, just use EDGE.
19+
20+
SuperNative is **the default**. New apps render native screens from the very first route — no configuration
21+
required.
22+
23+
<aside>
24+
25+
Prefer to keep building with the web view? [Opting out](#is-the-web-view-still-an-option) of native UIs couldn't
26+
be simpler.
27+
28+
</aside>
29+
30+
## What SuperNative is not
31+
32+
SuperNative is not a fully custom renderer, like Skia or Impeller. It does not attempt to create pixel-perfect
33+
cross-platform user interfaces. Instead it *embraces* the differences and simply smooths over them with a single
34+
consistent syntax.
35+
36+
It's not another virtual machine on top of or adjacent to PHP trying to convert *all* instructions to/from native
37+
equivalents. It's explicitly focused on turning PHP objects that conform to a known interface into a fixed-length
38+
byte array that can be processed by an explicit native-side interpreter.
39+
40+
It is also not a transpiler or HTML-to-native converter. We've built our own Blade engine that converts Blade components
41+
into a simplified binary format instead of HTML ([The Renderer](renderer)) and passes the
42+
43+
## Try it now
44+
45+
The fastest way to see SuperNative is to run the demo app,
46+
[`nativephp/super-native`](https://github.com/nativephp/super-native), on a simulator or device.
47+
48+
You'll need a working NativePHP for Mobile [development environment](../getting-started/environment-setup) first
49+
(Xcode for iOS, Android Studio for Android). Then clone the demo, install it, and run it:
50+
51+
```shell
52+
git clone https://github.com/nativephp/super-native
53+
cd super-native
54+
composer install
55+
php artisan native:install
56+
php artisan native:run
57+
```
58+
59+
`native:run` builds the app and launches it on your connected device or simulator. Explore the source to see how
60+
the screens are built, then start swapping in your own.
61+
62+
## How it works
63+
64+
SuperNative builds on three ideas working together:
65+
66+
- **Shared memory with PHP** — the native layer and your PHP application share memory directly, so there's no
67+
network round-trip, no serialization overhead, and no waiting on a web view bridge. State changes flow between
68+
PHP and the native UI almost instantly.
69+
- **Livewire-like components** — each screen is driven by a PHP component class that holds its state and behavior,
70+
just like a Livewire component. User interactions call your methods, your properties update, and the UI
71+
re-renders to match.
72+
- **Blade components for DX** — you define your UI with the same [EDGE component](../edge-components/introduction)
73+
syntax you already know. Familiar, expressive Blade templates compile down to native SwiftUI and Compose views.
74+
75+
If you've built anything with Livewire, you already know how to build with SuperNative.
76+
77+
For a look under the hood — how Blade becomes SwiftUI and Compose, how state flows across the shared-memory
78+
boundary, and the threading model behind it — see the rest of the [Architecture](about-the-new-architecture) section.
79+
80+
<aside>
81+
82+
You **don't** need to read any of this to build apps with NativePHP. If you're here to ship an app, start with the
83+
[Quick Start](../getting-started/quick-start) and [The Basics](../the-basics/overview) instead. This section is for
84+
the curious — and for plugin authors and contributors who want to understand the machinery they're building on.
85+
86+
</aside>
87+
88+
## Why SuperNative?
89+
90+
Two reasons above all:
91+
92+
- **Performance** — native views render and animate at full platform speed. No web view startup cost, no DOM, no
93+
JavaScript bridge. Scrolling, transitions and gestures feel exactly the way users expect because they're powered
94+
by the same UI frameworks every other native app uses.
95+
- **Accessibility** — SwiftUI and Jetpack Compose come with the platform's accessibility support built in.
96+
Screen readers, dynamic type, contrast settings and assistive controls work with your app out of the box,
97+
rather than being approximated through a browser.
98+
99+
There's more detail [in this blog article](/blog/supernative).
100+
101+
## Is the web view still an option?
102+
103+
Yes, but instead of being the default, it's now a component that you add to a native view. To make your app behave
104+
the same way that NativePHP for Mobile versions before v4 did, you can do something like this:
105+
106+
```php
107+
// routes/mobile.php
108+
Route::native('/home', WebViewScreen::class);
109+
110+
// webviewscreen.blade.php
111+
<webview url="/" fullscreen />
112+
113+
// routes/web.php
114+
Route::view('/', 'welcome');
115+
```
116+
117+
Then just set `NATIVEPHP_START_URL=/home` in your `.env`.
118+
119+
This way your existing web view-based app can keep on working and you can start adopt SuperNative one screen at a time
120+
whenever you're ready — or not at all.
121+
122+
## For Plugin Developers
123+
124+
SuperNative contains **no breaking changes** to our plugin architecture.
125+
126+
It actually expands what your plugins are capable of by giving you a standardized target for UI elements. That means your
127+
plugins can ship fully native EDGE components that you know will work consistently for developers using your plugin.
128+
129+
No need to make your plugins UI-less abstractions or support multiple flavors of front-end tooling; simply create and ship
130+
EDGE components and every consumer of your plugin will see the UI you intended.

‎resources/views/docs/mobile/4/concepts/_index.md‎

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: Digging Deeper
3+
order: 40
4+
---

0 commit comments

Comments
 (0)