Skip to content

Commit 3f1bdd1

Browse files
committed
add suggestions
1 parent 72b259f commit 3f1bdd1

2 files changed

Lines changed: 17 additions & 8 deletions

File tree

scripts/simulator.sh

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/sh
22

33
if [[ $# = 0 ]]; then
4-
echo "Usage: $0 Scheme-Name Debug/Release"
5-
exit 1
4+
echo "Usage: $0 Scheme-Name Debug/Release"
5+
exit 1
66
fi
77

88
TS_FILE="./scripts/validate-env.ts"
@@ -25,9 +25,18 @@ if [ $EXIT_CODE -ne 0 ]; then
2525
exit 1
2626
fi
2727

28-
# check if expo is installed as devDependency
29-
if [ -d "./node_modules/expo" ]; then
30-
expo run:ios --scheme $1 --configuration $2 ${@:3}
28+
if [[ $USE_RN_CLI = true ]]; then
29+
echo "Using react-native-cli"
30+
react-native run-ios --scheme $1 --mode $2 ${@:3}
31+
exit 0
3132
else
32-
react-native run-ios --scheme $1 --mode $2 ${@:3}
33-
fi
33+
# check if expo is in node_modules
34+
if [ ! -d "./node_modules/expo" ]; then
35+
echo "expo not found. Installing expo locally..."
36+
yarn add -D expo
37+
fi
38+
39+
echo "Using expo-cli"
40+
expo run:ios --scheme $1 --configuration $2 ${@:3}
41+
exit 0
42+
fi

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9300,7 +9300,7 @@ ts-interface-checker@^0.1.9:
93009300

93019301
ts-node@^10.9.1:
93029302
version "10.9.1"
9303-
resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz"
9303+
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b"
93049304
integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==
93059305
dependencies:
93069306
"@cspotcode/source-map-support" "^0.8.0"

0 commit comments

Comments
 (0)