You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Merge installation.md: preserve platform requirements from main + Windows performance tip
- Update ShowDocumentationController.php with latest changes
Copy file name to clipboardExpand all lines: resources/views/docs/mobile/1/getting-started/installation.md
+49-10Lines changed: 49 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: Installation
3
-
order: 150
3
+
order: 100
4
4
---
5
5
6
6
## Requirements
@@ -9,7 +9,42 @@ order: 150
9
9
2. Laravel 10 or higher
10
10
3.[A NativePHP for Mobile license](https://nativephp.com/mobile)
11
11
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`)
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 setin 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.
13
48
14
49
## Laravel
15
50
@@ -59,8 +94,6 @@ NATIVEPHP_APP_VERSION="DEBUG"
59
94
NATIVEPHP_APP_VERSION_CODE="1"
60
95
```
61
96
62
-
**Important: the NATIVEPHP_APP_ID must not contain any special characters or spaces**
63
-
64
97
## Run the NativePHP installer
65
98
66
99
```shell
@@ -69,10 +102,6 @@ php artisan native:install
69
102
70
103
The NativePHP installer takes care of setting up and configuring your Laravel application to work with iOS and Android.
71
104
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
-
76
105
## Start your app
77
106
78
107
**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
86
115
87
116
This will start compiling your application and boot it on whichever device you select.
88
117
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
0 commit comments