Skip to content

Commit cdb3d8b

Browse files
committed
chore: update README.md format for mobile example
- Reformatted Android and iOS setup instructions for clarity - Added whitespace for better readability - Updated code blocks for consistency
1 parent 3ad88bc commit cdb3d8b

File tree

1 file changed

+40
-14
lines changed

1 file changed

+40
-14
lines changed

examples/mobile/README.md

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Android
44

55
- **Build Library:**
6+
67
Run the following command to build the native library for Android:
78

89
```bash
@@ -21,45 +22,64 @@
2122
- **Emulator:** Create and launch an Android Virtual Device (AVD).
2223
- **USB Device:** Connect an Android device via USB.
2324
- **Wireless Device:** Pair your device using **Android Studio** (recommended for simplicity).
25+
2426
2. Start the ADB server and verify the connection:
27+
2528
```bash
2629
adb start-server
2730
adb devices
2831
```
32+
2933
3. Navigate to the Android project directory:
34+
3035
```bash
3136
cd android
3237
```
38+
3339
4. Ensure `./gradlew` has execution permissions:
40+
3441
```bash
3542
chmod +x ./gradlew
3643
```
44+
3745
5. Build the application:
46+
3847
- **Debug:**
48+
3949
```bash
4050
./gradlew assembleDebug
4151
```
52+
4253
- **Release:**
54+
4355
```bash
4456
./gradlew assembleRelease
4557
```
58+
4659
- **Bundle (requires signing configuration in Gradle):**
60+
4761
```bash
4862
./gradlew bundleRelease
4963
```
64+
5065
6. Install the application on the device:
51-
66+
5267
- **Debug:**
68+
5369
```bash
5470
adb install -r app/build/outputs/apk/debug/app-debug.apk
5571
```
72+
5673
- **Release:**
74+
5775
```bash
5876
adb install -r app/build/outputs/apk/release/app-release-unsigned.apk
5977
```
78+
6079
**Note:** The release build requires signing before installation.
61-
80+
6281
7. Launch the application:
82+
6383
```bash
6484
adb shell am start -n org.bevyengine.mobile/.MainActivity
6585
```
@@ -75,29 +95,35 @@
7595
- **Run Using Shell Commands:**
7696

7797
- **Run on the First Available Simulator:**
98+
7899
Simply run:
79-
100+
80101
```sh
81102
make
82103
```
83-
104+
84105
This executes the default `run` command in the `Makefile`, launching the app on the first available simulator.
85-
106+
86107
- **Run on a Specific Device:**
87-
108+
88109
1. **Find the Device ID:**
89-
110+
90111
- For **simulators**, run:
112+
91113
```sh
92114
xcrun simctl list devices
93115
```
116+
94117
- For **physical devices**, run:
118+
95119
```sh
96120
xcrun xctrace list devices
97121
```
122+
98123
- Copy the desired **Device ID**, e.g., `912BFD4B-9AFB-4DDE-983A-1816245DB2DA`.
99-
124+
100125
2. **Run the App on the Selected Device:**
126+
101127
```sh
102128
make run DEVICE_ID=912BFD4B-9AFB-4DDE-983A-1816245DB2DA
103129
```
@@ -108,12 +134,12 @@ This section shows how to develop both mobile and desktop apps within the same C
108134
109135
- **To run from the Bevy root:**
110136
111-
```bash
112-
cargo run -p bevy_mobile_example
113-
```
137+
```bash
138+
cargo run -p bevy_mobile_example
139+
```
114140
115141
- **To run from the Bevy examples directory for mobile:**
116142
117-
```bash
118-
cargo run
119-
```
143+
```bash
144+
cargo run
145+
```

0 commit comments

Comments
 (0)