[build-tools] Install builds in simulator sessions - #4222
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4222 +/- ##
==========================================
+ Coverage 63.76% 63.82% +0.06%
==========================================
Files 1030 1032 +2
Lines 47497 47608 +111
Branches 9993 10022 +29
==========================================
+ Hits 30280 30379 +99
- Misses 17116 17126 +10
- Partials 101 103 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
cfdb8f7 to
aec8737
Compare
| const infoPlistPath = path.join(artifactPath, 'Info.plist'); | ||
| const { stdout } = await spawn( | ||
| 'plutil', | ||
| ['-extract', 'CFBundleIdentifier', 'raw', '-o', '-', infoPlistPath], | ||
| { stdio: 'pipe', env } | ||
| ); |
There was a problem hiding this comment.
i wonder if we should unify this with
somehow (or at least addreadIosAppInfo or sth
There was a problem hiding this comment.
Agree that a shared iOS application metadata abstraction would be cleaner. I’d prefer to handle that as a follow-up so this PR stays focused on the install/launch primitives.
| } | ||
|
|
||
| logger.info(`Installing ${artifactPath} on the iOS Simulator.`); | ||
| await spawn('xcrun', ['simctl', 'install', 'booted', artifactPath], { env, logger }); |
There was a problem hiding this comment.
technically it would be nice to add support for:
- device identifier to install the app on
- multiple booted devices
There was a problem hiding this comment.
Agree this would be useful. I’d like to add it separately once we define whether the function accepts one device identifier or supports installing on multiple devices. The current remote-session use case has one booted target.
| throw new UserError( | ||
| 'EAS_INSTALL_BUILD_INVALID_ARTIFACT', | ||
| 'Android Emulator sessions require an .apk build artifact.' | ||
| ); |
There was a problem hiding this comment.
would be nice to add support for converting aab to apk on the fly
There was a problem hiding this comment.
Agree this would be useful. I think AAB conversion should be an explicit composable function rather than hidden inside install_build because it also requires bundletool and signing decisions. I’ll treat it as follow-up scope.
| } | ||
|
|
||
| logger.info(`Installing ${artifactPath} on the Android Emulator.`); | ||
| await spawn('adb', ['install', '-r', artifactPath], { env, logger }); |
There was a problem hiding this comment.
-r reinstalls/replaces an already installed application while preserving its existing app data - just in case
|
✅ Thank you for adding the changelog entry! |
Why
Follow up to https://github.com/expo/universe/pull/30191
Enable EAS Sim users to preinstall and start builds when starting sim session
How
Add/use
eas/download_build,eas/install_build, andeas/launch_applicationsteps to accomplish it.Test Plan
Tests