From 593fde185334662f9bd0fea56689bf7969ab3657 Mon Sep 17 00:00:00 2001 From: Shane Rosenthal Date: Sun, 1 Jun 2025 19:14:01 -0400 Subject: [PATCH 1/3] Updates some of the docs for mobile --- .../docs/mobile/1/the-basics/app-assets.md | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 resources/views/docs/mobile/1/the-basics/app-assets.md diff --git a/resources/views/docs/mobile/1/the-basics/app-assets.md b/resources/views/docs/mobile/1/the-basics/app-assets.md new file mode 100644 index 00000000..47d4eafb --- /dev/null +++ b/resources/views/docs/mobile/1/the-basics/app-assets.md @@ -0,0 +1,69 @@ +--- +title: App Assets +order: 400 +--- + +## Customizing Your App Icon + +NativePHP makes it easy to apply a custom app icon to your iOS and Android builds. + +### Step 1: Provide Your Icon + +Place a single high-resolution icon file at: `public/icon.png` + + +### Requirements: +- Format: PNG +- Size: 1024 × 1024 pixels +- Shape: Square +- Background: Transparent or solid — your choice + +Note: This image will be automatically resized for all Android densities and used as the base iOS app icon. + +--- + +## Compiling CSS and JavaScript + +Your device behaves like a server, so assets must be compiled before deployment. + +To ensure your latest styles and JavaScript are included, run: `npm run build` before running: `php artisan native:run`. + +If you’ve made changes to your frontend, this step is required to see them reflected in the app. + +--- + +## Using the --watch Flag (Experimental) + +NativePHP includes an experimental `--watch` flag that enables automatic file syncing while the app is running: + +php artisan native:run --watch + +This is useful during development for quickly testing changes without rebuilding the entire app. + +### Caveats + +- This feature is currently best suited for **Blade** and **Livewire** applications. +- It does **not** currently detect or sync **compiled frontend assets**, such as those built with Vite or used by **Inertia.js**. +- If you're working with a JavaScript-heavy stack (Vue, React, Inertia), you should continue using `npm run build` before launching the app with `native:run`. + +### Recommendation + +Use `--watch` when you're iterating on Blade views or Livewire components. For all other use cases, treat this flag as experimental and optional. + +--- + +## Optional: Installing with ICU Support + +By default, NativePHP installs a smaller PHP runtime without ICU (International Components for Unicode) to keep app size minimal. + +If your Laravel app uses features that rely on `intl` (such as number formatting, localized date handling, or advanced string collation), you’ll need ICU support enabled. + +To include ICU during installation, select it when running: `php artisan native:install`. + +This will install a version of PHP with full ICU support. Note that it increases the PHP binary size significantly (typically from ~16MB to ~44MB). + +**Important:** If you plan to use [Filament](https://filamentphp.com/) in your app, you must enable this option. Filament relies on the `intl` extension for formatting and localization features. + + + + From 9fefd45e31b1198d6335dffc7e648e5d1f06b175 Mon Sep 17 00:00:00 2001 From: Shane Rosenthal Date: Sun, 1 Jun 2025 19:27:51 -0400 Subject: [PATCH 2/3] Updates ordering for docs --- resources/views/docs/mobile/1/the-basics/app-assets.md | 2 +- resources/views/docs/mobile/1/the-basics/deep-links.md | 2 +- resources/views/docs/mobile/1/the-basics/dialogs.md | 2 +- resources/views/docs/mobile/1/the-basics/native-functions.md | 2 +- resources/views/docs/mobile/1/the-basics/system.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/views/docs/mobile/1/the-basics/app-assets.md b/resources/views/docs/mobile/1/the-basics/app-assets.md index 47d4eafb..b8346f00 100644 --- a/resources/views/docs/mobile/1/the-basics/app-assets.md +++ b/resources/views/docs/mobile/1/the-basics/app-assets.md @@ -1,6 +1,6 @@ --- title: App Assets -order: 400 +order: 200 --- ## Customizing Your App Icon diff --git a/resources/views/docs/mobile/1/the-basics/deep-links.md b/resources/views/docs/mobile/1/the-basics/deep-links.md index 7be701b6..804bb0b1 100644 --- a/resources/views/docs/mobile/1/the-basics/deep-links.md +++ b/resources/views/docs/mobile/1/the-basics/deep-links.md @@ -1,6 +1,6 @@ --- title: Deep, Universal, App Links and NFC -order: 900 +order: 500 --- ## Overview diff --git a/resources/views/docs/mobile/1/the-basics/dialogs.md b/resources/views/docs/mobile/1/the-basics/dialogs.md index a7e35836..4ccba9c4 100644 --- a/resources/views/docs/mobile/1/the-basics/dialogs.md +++ b/resources/views/docs/mobile/1/the-basics/dialogs.md @@ -1,6 +1,6 @@ --- title: Dialogs -order: 400 +order: 300 --- ## Native Dialogs diff --git a/resources/views/docs/mobile/1/the-basics/native-functions.md b/resources/views/docs/mobile/1/the-basics/native-functions.md index 630d184b..3260b32f 100644 --- a/resources/views/docs/mobile/1/the-basics/native-functions.md +++ b/resources/views/docs/mobile/1/the-basics/native-functions.md @@ -1,6 +1,6 @@ --- title: Native Functions -order: 1 +order: 100 --- Nearly any basic Laravel app will work as a mobile app with NativePHP for Mobile. However, what makes NativePHP diff --git a/resources/views/docs/mobile/1/the-basics/system.md b/resources/views/docs/mobile/1/the-basics/system.md index cc3236d3..8e87a747 100644 --- a/resources/views/docs/mobile/1/the-basics/system.md +++ b/resources/views/docs/mobile/1/the-basics/system.md @@ -1,6 +1,6 @@ --- title: System -order: 800 +order: 400 --- ## Native System From a699a3086226bedcf70393cc05989df5e64f2353 Mon Sep 17 00:00:00 2001 From: Shane Rosenthal Date: Sat, 14 Jun 2025 22:37:32 -0400 Subject: [PATCH 3/3] updates doc --- resources/views/docs/mobile/1/getting-started/installation.md | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/views/docs/mobile/1/getting-started/installation.md b/resources/views/docs/mobile/1/getting-started/installation.md index 3ba83b09..6f930534 100644 --- a/resources/views/docs/mobile/1/getting-started/installation.md +++ b/resources/views/docs/mobile/1/getting-started/installation.md @@ -76,6 +76,7 @@ Then run: ```shell composer require nativephp/mobile ``` +*If you experience a cURL error when running this command make sure you are running PHP v8.3+ in your CLI.* If this is the first time you're installing the package, you will be prompted to authenticate. Your username is the email address you used when purchasing your license. Your password is your license key.