Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions resources/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -263,5 +268,5 @@ nav.docs-navigation > ul > li > ul {
}

.dark .prose code {
@apply text-gray-300;
@apply bg-gray-800 text-purple-300;
}
6 changes: 3 additions & 3 deletions resources/views/docs/mobile/1/apis/browser.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()`
Expand All @@ -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
Expand Down
15 changes: 6 additions & 9 deletions resources/views/docs/mobile/1/getting-started/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions resources/views/docs/mobile/1/the-basics/app-icon.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions resources/views/docs/mobile/1/the-basics/splash-screens.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)