Skip to content

Commit 6783490

Browse files
committed
Resolve merge conflicts with main branch
- Merge installation.md: preserve platform requirements from main + Windows performance tip - Update ShowDocumentationController.php with latest changes
1 parent bdcac7b commit 6783490

File tree

2 files changed

+49
-11
lines changed

2 files changed

+49
-11
lines changed

app/Http/Controllers/ShowDocumentationController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ protected function getPageProperties($platform, $version, $page = null): array
143143
}
144144
}
145145

146-
147146
return $pageProperties;
148147
}
149148

resources/views/docs/mobile/1/getting-started/installation.md

Lines changed: 49 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Installation
3-
order: 150
3+
order: 100
44
---
55

66
## Requirements
@@ -9,7 +9,42 @@ order: 150
99
2. Laravel 10 or higher
1010
3. [A NativePHP for Mobile license](https://nativephp.com/mobile)
1111

12-
For platform-specific development environment setup (iOS and Android), see the [Environment Setup](/docs/mobile/1/getting-started/environment-setup) page.
12+
### For iOS
13+
1. An Apple Silicon Mac running macOS 12+ with [Xcode 16+](https://apps.apple.com/app/xcode/id497799835)
14+
2. An active [Apple Developer account](https://developer.apple.com/)
15+
3. _Optional_ iOS device
16+
17+
You **do not** need to enroll in the [Apple Developer Program](https://developer.apple.com/programs/enroll/) ($99/year)
18+
to develop and test your apps on a Simulator. But you will need to when you want to test your apps on real devices
19+
and start distributing them to your users via the App Store.
20+
21+
> **Note** You cannot build iOS apps on Windows or Linux
22+
23+
### For Android
24+
1. [Android Studio Giraffe (or later)](https://developer.android.com/studio)
25+
2. The following environment variables set.
26+
3. You should be able to successfully run `java -v` and `adb devices` from the terminal.
27+
4. **Windows only**: You must have [7zip](https://www.7-zip.org/) installed.
28+
29+
#### On macOS
30+
```shell
31+
export JAVA_HOME=$(/usr/libexec/java_home -v 17) // This isn't required if JAVA_HOME is already set in your environment variables (check using `printenv | grep JAVA_HOME`)
32+
export ANDROID_HOME=$HOME/Library/Android/sdk
33+
export PATH=$PATH:$JAVA_HOME/bin:$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools
34+
```
35+
36+
#### On Windows
37+
```shell
38+
set ANDROID_HOME=C:\Users\yourname\AppData\Local\Android\Sdk
39+
set PATH=%PATH%;%JAVA_HOME%\bin;%ANDROID_HOME%\platform-tools
40+
41+
# This isn't required if JAVA_HOME is already set in the Windows Env Variables
42+
set JAVA_HOME=C:\Program Files\Microsoft\jdk-17.0.8.7-hotspot
43+
```
44+
45+
You don't _need_ a physical iOS/Android device to compile and test your application, as NativePHP for Mobile supports
46+
the iOS Simulator and Android emulators. However, we highly recommend that you test your application on a real device before submitting to the
47+
Apple App Store and Google Play Store.
1348
1449
## Laravel
1550
@@ -59,8 +94,6 @@ NATIVEPHP_APP_VERSION="DEBUG"
5994
NATIVEPHP_APP_VERSION_CODE="1"
6095
```
6196
62-
**Important: the NATIVEPHP_APP_ID must not contain any special characters or spaces**
63-
6497
## Run the NativePHP installer
6598
6699
```shell
@@ -69,10 +102,6 @@ php artisan native:install
69102
70103
The NativePHP installer takes care of setting up and configuring your Laravel application to work with iOS and Android.
71104
72-
## ICU Support (Android Only)
73-
74-
If you are wanting to run [Filament](https://filamentphp.com) or use some of the Number or I18n methods within Laravel you will need to install NativePHP with the optional ICU supported binaries, more on that [here](/docs/mobile/1/the-basics/icu-support).
75-
76105
## Start your app
77106
78107
**Heads up!** Before starting your app in a native context, try running it in the browser. You may bump into exceptions
@@ -86,6 +115,16 @@ php artisan native:run
86115
87116
This will start compiling your application and boot it on whichever device you select.
88117
89-
And that's it! You should now see your Laravel application running as a native app! 🎉
118+
### Running on a real device
119+
120+
#### On iOS
121+
If you want to run your app on a real iOS device, you need to make sure it is in
122+
[Developer Mode](https://developer.apple.com/documentation/xcode/enabling-developer-mode-on-a-device)
123+
and that it's been added to your Apple Developer account as
124+
[a registered device](https://developer.apple.com/account/resources/devices/list).
125+
126+
#### On Android
127+
On Android you need to [enable developer options](https://developer.android.com/studio/debug/dev-options#enable)
128+
and have USB debugging (ADB) enabled.
90129
91-
For information about running on real devices, see the [Environment Setup](/docs/mobile/1/getting-started/environment-setup) page.
130+
And that's it! You should now see your Laravel application running as a native app! 🎉

0 commit comments

Comments
 (0)