From 1863acffaba59c8d27e40636c158646987f29e19 Mon Sep 17 00:00:00 2001 From: Shane Rosenthal Date: Fri, 26 Sep 2025 12:23:07 -0400 Subject: [PATCH 1/2] Updates browser docs --- resources/views/docs/mobile/1/apis/browser.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/views/docs/mobile/1/apis/browser.md b/resources/views/docs/mobile/1/apis/browser.md index 5e51061a..8baea45e 100644 --- a/resources/views/docs/mobile/1/apis/browser.md +++ b/resources/views/docs/mobile/1/apis/browser.md @@ -22,12 +22,12 @@ Opens a URL in an embedded browser within your app using Custom Tabs (Android) o Browser::inApp('https://nativephp.com/mobile'); ``` -### `system()` +### `open()` Opens a URL in the device's default browser app, leaving your application entirely. ```php -Browser::system('https://nativephp.com/mobile'); +Browser::open('https://nativephp.com/mobile'); ``` ### `auth()` @@ -47,7 +47,7 @@ Browser::auth('https://provider.com/oauth/authorize?client_id=123&redirect_uri=n - External content that relates to your app - When you want users to easily return to your app -**`system()`** - Full browser experience needed: +**`open()`** - Full browser experience needed: - Complex web applications - Content requiring specific browser features - When users need bookmarking or sharing capabilities From d6bd79a58dfc9f6af069a337f08e19d62331b4c5 Mon Sep 17 00:00:00 2001 From: Shane Rosenthal Date: Fri, 3 Oct 2025 16:11:01 -0400 Subject: [PATCH 2/2] Improve code styling and update mobile docs Enhanced code block styling in app.css for better readability, including dark mode improvements. Updated mobile documentation to clarify hot reloading usage and implementation, and added GD PHP extension requirements for app icon and splash screen generation. --- resources/css/app.css | 11 ++++++++--- .../docs/mobile/1/getting-started/development.md | 15 ++++++--------- .../views/docs/mobile/1/the-basics/app-icon.md | 1 + .../docs/mobile/1/the-basics/splash-screens.md | 1 + 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/resources/css/app.css b/resources/css/app.css index 0bff4f79..73c3d37c 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -194,11 +194,16 @@ nav.docs-navigation > ul > li > ul { } .prose pre code { - @apply text-gray-50; + @apply bg-transparent p-0 text-sm font-normal text-gray-50; } .prose code { - @apply px-1; + @apply rounded bg-gray-200 px-1.5 py-0.5 text-sm font-medium text-purple-600; +} + +.prose code::before, +.prose code::after { + content: none; } .prose a { @@ -263,5 +268,5 @@ nav.docs-navigation > ul > li > ul { } .dark .prose code { - @apply text-gray-300; + @apply bg-gray-800 text-purple-300; } diff --git a/resources/views/docs/mobile/1/getting-started/development.md b/resources/views/docs/mobile/1/getting-started/development.md index 0b7fcc06..18000d01 100644 --- a/resources/views/docs/mobile/1/getting-started/development.md +++ b/resources/views/docs/mobile/1/getting-started/development.md @@ -91,28 +91,25 @@ If you're familiar with these tools, you can easily open the projects using the php artisan native:open ``` -## Hot Reloading (Experimental) +## Hot Reloading We've tried to make compiling your apps as fast as possible, but when coming from the 'make a change; hit refresh'-world of PHP development that we all love, compiling apps can feel like a slow and time-consuming process. -So we've released an early version of hot reloading, which aims to make your development experience feel just like home. +So we've released hot reloading, which aims to make your development experience feel just like home. -You can enable hot reloading by adding the `--watch` flag when running the `native:run` command: +You can enable hot reloading by running the following command: ```shell -php artisan native:run --watch +php artisan native:watch {platform:ios|android} ``` This is useful during development for quickly testing changes without re-compiling your entire app. When you make changes to any files in your Laravel app, the web view will be reloaded and your changes should show almost immediately. -### Caveats +### Implementation -For now, hot reloading only works in emulators, not on real devices. - -Also, it's currently best suited for **Blade** and **Livewire** applications. It doesn't work so well if you're -also trying to hot reload compiled frontends using something like Vite's hot reloading. +The proper way to implement this is to first `run` your app on your device/emulator, then start HMR with `npm run dev` then in a separate terminal run the `native:watch` command. This will reload any Blade/Livewire files as well as any recompiled assets (css/js etc). ## Releasing diff --git a/resources/views/docs/mobile/1/the-basics/app-icon.md b/resources/views/docs/mobile/1/the-basics/app-icon.md index f20f4dbe..42d18f26 100644 --- a/resources/views/docs/mobile/1/the-basics/app-icon.md +++ b/resources/views/docs/mobile/1/the-basics/app-icon.md @@ -13,6 +13,7 @@ Place a single high-resolution icon file at: `public/icon.png`. - Format: PNG - Size: 1024 × 1024 pixels - Background: Transparent or solid — your choice +- GD PHP extension must be enabled, ensure it has enough memory (~2GB should be enough) This image will be automatically resized for all Android densities and used as the base iOS app icon. You must have the GD extension installed in your development machine's PHP environment for this to work. diff --git a/resources/views/docs/mobile/1/the-basics/splash-screens.md b/resources/views/docs/mobile/1/the-basics/splash-screens.md index eedcd1d5..1c803e4e 100644 --- a/resources/views/docs/mobile/1/the-basics/splash-screens.md +++ b/resources/views/docs/mobile/1/the-basics/splash-screens.md @@ -15,3 +15,4 @@ Place the relevant files in the locations specified: ### Requirements - Format: PNG - Minimum Size/Ratio: 1080 × 1920 pixels +- GD PHP extension must be enabled, ensure it has enough memory (~2GB should be enough)