-
Notifications
You must be signed in to change notification settings - Fork 180
Move self app store to mobile sdk #1040
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 10 commits
6426a3f
6e05bc4
7d31387
608d5ad
60e43e0
702eb12
230431a
0fb62b7
dd6e572
b168774
370155a
d953ae7
48bb356
c5343c4
9b32b1c
3bbc3a8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -12,12 +12,12 @@ | |||||||||||||||||||
|
|
||||||||||||||||||||
| ### Android | ||||||||||||||||||||
|
|
||||||||||||||||||||
| | Requirement | Version | Installation Guide | | ||||||||||||||||||||
| | --------------------------- | ------------- | ------------------------------------------------------------------------------------- | | ||||||||||||||||||||
| | Java | 17 | [Install Java](https://www.oracle.com/java/technologies/javase-jdk17-downloads.html) | | ||||||||||||||||||||
| | Android Studio (Optional)* | Latest | [Install Android Studio](https://developer.android.com/studio) | | ||||||||||||||||||||
| | Android SDK | Latest | See instructions for Android below | | ||||||||||||||||||||
| | Android NDK | 27.0.11718014 | See instructions for Android below | | ||||||||||||||||||||
| | Requirement | Version | Installation Guide | | ||||||||||||||||||||
| | --------------------------- | ------------- | ------------------------------------------------------------------------------------ | | ||||||||||||||||||||
| | Java | 17 | [Install Java](https://www.oracle.com/java/technologies/javase-jdk17-downloads.html) | | ||||||||||||||||||||
| | Android Studio (Optional)\* | Latest | [Install Android Studio](https://developer.android.com/studio) | | ||||||||||||||||||||
| | Android SDK | Latest | See instructions for Android below | | ||||||||||||||||||||
| | Android NDK | 27.0.11718014 | See instructions for Android below | | ||||||||||||||||||||
|
|
||||||||||||||||||||
| \* To facilitate the installation of the SDK and the NDK, and to pair with development devices with a conventient QR code, you can use Android Studio. | ||||||||||||||||||||
|
|
||||||||||||||||||||
|
|
@@ -62,39 +62,40 @@ Under **SDK Platforms**, install the platform with the highest API number | |||||||||||||||||||
|
|
||||||||||||||||||||
| Under **SDK Tools**, check the **Show Package Details** checkbox, expand **NDK (Side by side)**, select version **27.0.11718014** and install. | ||||||||||||||||||||
|
|
||||||||||||||||||||
|
|
||||||||||||||||||||
| #### Using sdkmanager via CLI | ||||||||||||||||||||
|
|
||||||||||||||||||||
| Create a directory for the Android SDK. For example `~/android_sdk`. Define the environment variable `ANDROID_HOME` to point that directory. | ||||||||||||||||||||
|
|
||||||||||||||||||||
| Install sdkmanager under `ANDROID_HOME` according to the instructions on https://developer.android.com/tools/sdkmanager | ||||||||||||||||||||
|
|
||||||||||||||||||||
|
|
||||||||||||||||||||
|
|
||||||||||||||||||||
| List available SDK platforms | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ```bash | ||||||||||||||||||||
| $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --list | grep platforms | ||||||||||||||||||||
| ``` | ||||||||||||||||||||
|
|
||||||||||||||||||||
| In the list of platforms, find the latest version and install it. (Replace *NN* with the latest version number) | ||||||||||||||||||||
| In the list of platforms, find the latest version and install it. (Replace _NN_ with the latest version number) | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ```bash | ||||||||||||||||||||
| $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install "platforms;android-NN" | ||||||||||||||||||||
| ``` | ||||||||||||||||||||
|
|
||||||||||||||||||||
|
Comment on lines
71
to
82
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Add license acceptance; without it, CLI installs fail at build time
List available SDK platforms
```bash
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --list | grep platforms+Accept licenses (required): $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install "platforms;android-NN"In app/README.md around lines 71 to 82, the docs list and install Android |
||||||||||||||||||||
| Install the NDK | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ```bash | ||||||||||||||||||||
| $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install "ndk;27.0.11718014" | ||||||||||||||||||||
| ``` | ||||||||||||||||||||
|
|
||||||||||||||||||||
| Define the environment variable `ANDROID_NDK_VERSION` to `27.0.11718014` and `ANDROID_NDK` to `$ANDROID_HOME/ndk/27.0.11718014` | ||||||||||||||||||||
|
|
||||||||||||||||||||
|
Comment on lines
83
to
90
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Use standard NDK env var naming and document
-Define the environment variable `ANDROID_NDK_VERSION` to `27.0.11718014` and `ANDROID_NDK` to `$ANDROID_HOME/ndk/27.0.11718014`
+Define `ANDROID_NDK_VERSION=27.0.11718014` and either:
+- `ANDROID_NDK_ROOT=$ANDROID_HOME/ndk/27.0.11718014`, or
+- set `ndk.dir` in `android/local.properties`.
+Gradle’s `android.ndkVersion` must match the version above.📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||
| Install Platform Tools, needed for the `adb` tool | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ```bash | ||||||||||||||||||||
| $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install platform-tools | ||||||||||||||||||||
| ``` | ||||||||||||||||||||
|
|
||||||||||||||||||||
| Add `$ANDROID_HOME/platform-tools` to your `$PATH` variable | ||||||||||||||||||||
|
|
||||||||||||||||||||
|
|
||||||||||||||||||||
| ## Run the app | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ### Android | ||||||||||||||||||||
|
|
@@ -108,11 +109,13 @@ In Android Studio, use Device Manager to pair with and connect to your phone. | |||||||||||||||||||
| ##### Using adb | ||||||||||||||||||||
|
|
||||||||||||||||||||
| In your phone's developer settings, select **Wireless debugging** > **Pair the device using a pairing code**. Using the displayed information, run | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ``` | ||||||||||||||||||||
| adb pair PHONE_IP:PAIRING_PORT PAIRING_CODE | ||||||||||||||||||||
| ``` | ||||||||||||||||||||
|
|
||||||||||||||||||||
| To connect to the device, find the IP number and port (different port than in the pairing step) directly under Wireless debugging, and run | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ``` | ||||||||||||||||||||
| adb connect PHONE_IP:DEVELOPMENT_PORT | ||||||||||||||||||||
| ``` | ||||||||||||||||||||
aaronmgdr marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||
|
|
@@ -126,11 +129,11 @@ sdk.dir=/path/to/your/android/sdk | |||||||||||||||||||
| ``` | ||||||||||||||||||||
|
|
||||||||||||||||||||
| or create it with | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ```bash | ||||||||||||||||||||
| echo sdk.dir=$ANDROID_HOME > android/local.properties | ||||||||||||||||||||
| ``` | ||||||||||||||||||||
|
|
||||||||||||||||||||
|
Comment on lines
131
to
136
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Show This prevents Gradle from resolving the wrong NDK when multiple versions are present. Create the file `android/local.properties` specifying the SDK directory, for example:
sdk.dir=/path/to/your/android/sdk In app/README.md around lines 131 to 136, the local.properties example only sets |
||||||||||||||||||||
|
|
||||||||||||||||||||
| Launch the React Native server: | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ```bash | ||||||||||||||||||||
|
|
@@ -160,6 +163,7 @@ pod install | |||||||||||||||||||
| And run the app in Xcode. | ||||||||||||||||||||
|
|
||||||||||||||||||||
| #### Simulator Build | ||||||||||||||||||||
|
|
||||||||||||||||||||
| > **Note:** iOS Simulator on Apple Silicon Macs requires Rosetta (x86_64) mode due to simulator architecture compatibility. If you're using a Silicon Mac (M1/M2/M3/M4), you may find that the Rosetta simulator build option is not available by default in Xcode. | ||||||||||||||||||||
|
|
||||||||||||||||||||
| To enable it, open Xcode and go to **Product > Destination > Show All Run Destinations**. This will unlock the ability to select the Rosetta build simulator, allowing you to run the app in the iOS Simulator. | ||||||||||||||||||||
|
|
@@ -235,6 +239,7 @@ Deployments happen automatically when you merge PRs: | |||||||||||||||||||
| 2. **Merge to `main`** → Deploys to production | ||||||||||||||||||||
|
|
||||||||||||||||||||
| To control versions with PR labels: | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - `version:major` - Major version bump | ||||||||||||||||||||
| - `version:minor` - Minor version bump | ||||||||||||||||||||
| - `version:patch` - Patch version bump (default for main) | ||||||||||||||||||||
|
|
@@ -257,6 +262,7 @@ git push && git push --tags | |||||||||||||||||||
| ``` | ||||||||||||||||||||
|
|
||||||||||||||||||||
| The release script will: | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - Check for uncommitted changes | ||||||||||||||||||||
| - Bump the version in package.json | ||||||||||||||||||||
| - Update iOS and Android native versions | ||||||||||||||||||||
|
|
@@ -310,7 +316,9 @@ bundle exec fastlane ios build_local | |||||||||||||||||||
| ### Troubleshooting Deployments | ||||||||||||||||||||
|
|
||||||||||||||||||||
| #### Version Already Exists | ||||||||||||||||||||
|
|
||||||||||||||||||||
| The build system auto-increments build numbers. If you get version conflicts: | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ```bash | ||||||||||||||||||||
| # Check current versions | ||||||||||||||||||||
| node scripts/version.cjs status | ||||||||||||||||||||
|
|
@@ -321,6 +329,7 @@ node scripts/version.cjs bump-build android | |||||||||||||||||||
| ``` | ||||||||||||||||||||
|
|
||||||||||||||||||||
| #### Certificate Issues (iOS) | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ```bash | ||||||||||||||||||||
| # Check certificate validity | ||||||||||||||||||||
| bundle exec fastlane ios check_certs | ||||||||||||||||||||
|
|
@@ -332,18 +341,22 @@ bundle exec fastlane ios check_certs | |||||||||||||||||||
| ``` | ||||||||||||||||||||
|
|
||||||||||||||||||||
| #### Play Store Upload Issues | ||||||||||||||||||||
|
|
||||||||||||||||||||
| If automated upload fails, the AAB is saved locally: | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - Location: `android/app/build/outputs/bundle/release/app-release.aab` | ||||||||||||||||||||
| - Upload manually via Play Console | ||||||||||||||||||||
|
|
||||||||||||||||||||
aaronmgdr marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||
| ### Build Optimization | ||||||||||||||||||||
|
|
||||||||||||||||||||
| The CI/CD pipeline uses extensive caching: | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - **iOS builds**: ~15 minutes (with cache) | ||||||||||||||||||||
| - **Android builds**: ~10 minutes (with cache) | ||||||||||||||||||||
| - **First build**: ~25 minutes (no cache) | ||||||||||||||||||||
|
|
||||||||||||||||||||
| To speed up local builds: | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ```bash | ||||||||||||||||||||
| # Clean only what's necessary | ||||||||||||||||||||
| yarn clean:build # Clean build artifacts only | ||||||||||||||||||||
|
|
||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,8 +24,8 @@ | |
| "clean:xcode": "rm -rf ~/Library/Developer/Xcode/DerivedData", | ||
| "clean:xcode-env-local": "rm -f ios/.xcode.env.local", | ||
| "find:type-imports": "node scripts/find-type-import-issues.mjs", | ||
| "fmt": "prettier --check .", | ||
| "fmt:fix": "prettier --write .", | ||
| "fmt": "yarn prettier --check .", | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. otherwise it might try to use the global prettier if you have it |
||
| "fmt:fix": "yarn prettier --write .", | ||
| "format": "yarn nice", | ||
| "ia": "yarn install-app", | ||
| "imports:fix": "node ./scripts/alias-imports.cjs", | ||
|
|
||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prettier