Repository navigation
Catalyst native builds without Android Studio or Xcode #569
mayansharma
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
We are moving every native build step that needs Android Studio or Xcode today into the Catalyst CLI, starting with 1.3.0. One command per platform sets up the machine and builds to an emulator, a phone, or a signed store build, locally or in CI. Xcode still has to be installed for Apple's build tools, but no need to open it.
Manual today
setupEmulator, which writes your Mac's IP intoconfig.jsonand starts the server. A new Wi-Fi network means running it again and rebuilding.config.json. If you forget, the template's ids ship.config.jsonholds, so you switch it to production before releasing and back afterwards.versionCodeis fixed at 1, so Play rejects a second upload.config.jsonand signs with the template's committed key or a new key per build. iOS needs a team and profile picked in Xcode, then an archive and export there.What each step becomes
buildAppasks and installs it. The JDK comes from Homebrew.sdkPath, thenANDROID_HOME, then~/Library/Android/sdk, so nobody types a path.buildAppstarts the server if it isn't running, then launches the app.localhost:adb reverseon Android, and the iOS simulator shares the Mac's network. A physical iPhone uses the Mac's name, likeyour-mac.local.config.json. A one-time fix putslocalhostback where the old setup saved your IP."appId": "com.example.myshop"inconfig.json, derived from the project name, so the id is visible and the same in dev and release from day one.com.example.*and the template's ids.appNamesets the label under the icon.appIdkeep using their per-platform keys.urlonce, likehttps://shop.acme.com. Dev builds use the dev server, so there is nothing to switch back.LOCAL_IPandportkeep working.--url, described below.public/icon.png, square and at least 1024 px, and every size is generated from it.public/android/appIconsandpublic/ios/appIconsstill take precedence.package.json. Bump it withnpm versionbefore each App Store release.CATALYST_BUILD_NUMBERoverrides it.npm run android:releasewrites a signed AAB andnpm run ios:releasea signed IPA, both inbuild-output/<platform>/<version>-<build>/.credentials/android/folder, and reminds you to back it up.catalyst credentials:export androidprints it ready to paste into GitHub, and the secret doubles as the key backup.How people and agents run it
People run npm scripts that ship with the template:
.catalyst/local.json.--release,--device,--url,--yesand--accept-licenses. A missing answer fails at once with an error that names the flag."android:staging": "catalyst buildApp:android --release --url https://staging.acme.com", and people and CI both run it.catalyst --helpshow the scripts to add.All reactions