fix: iOS build stage to install app on simulator (#18839)

fixes #18836

## Summary

While introducing https://github.com/status-im/status-mobile/pull/18784 I missed out on adding an install step to `run-ios.sh` script.

`make run-ios` would work fine for simulators that already have the app installed but would fail for new emulators.
@flexsurfer  discovered this problem.

This commit fixes that by adding an install step to the script.

## Review notes
- `make run-clojure`
- `make run-ios` 
should just work.

## Platforms
- iOS
This commit is contained in:
Siddarth Kumar 2024-02-15 17:55:06 +05:30 committed by GitHub
parent 834c0a3800
commit e6ea8ae9a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 1 deletions

View File

@ -58,8 +58,15 @@ xcrun simctl boot "$UUID"
# start the simulator
open -a Simulator --args -CurrentDeviceUDID "$UUID"
BUILD_DIR="${GIT_ROOT}/build"
#iOS build of debug scheme
xcodebuild -workspace "ios/StatusIm.xcworkspace" -configuration Debug -scheme StatusIm -destination id="$UUID" | xcbeautify
xcodebuild -workspace "ios/StatusIm.xcworkspace" -configuration Debug -scheme StatusIm -destination id="$UUID" -derivedDataPath "${BUILD_DIR}" | xcbeautify
APP_PATH="${BUILD_DIR}/Build/Products/Debug-iphonesimulator/StatusIm.app"
# Install on the simulator
xcrun simctl install "$UUID" "$APP_PATH"
trap cleanupMetro EXIT ERR INT QUIT
runMetro &