Skip to content

Commit ec1f7a1

Browse files
committed
chore: extract bundle react native code and images to a standalone script
1 parent 9f5b0f1 commit ec1f7a1

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

packages/platform-ios/template/ios/HelloWorld.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
);
180180
runOnlyForDeploymentPostprocessing = 0;
181181
shellPath = /bin/sh;
182-
shellScript = "set -e\nif [[ -f \"$PODS_ROOT/../.xcode.env\" ]]; then\nsource \"$PODS_ROOT/../.xcode.env\"\nfi\nif [[ -f \"$PODS_ROOT/../.xcode.env.local\" ]]; then\nsource \"$PODS_ROOT/../.xcode.env.local\"\nfi\nexport CONFIG_CMD=\"dummy-workaround-value\"\nexport CLI_PATH=\"$(\"$NODE_BINARY\" --print \"require('path').dirname(require.resolve('@rnef/cli/package.json')) + '/dist/src/bin.js'\")\"\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
182+
shellScript = "bash -l -c \"${PROJECT_DIR}/bundle-react-native-code-and-images.sh\"\n";
183183
};
184184
00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = {
185185
isa = PBXShellScriptBuildPhase;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
set -e
2+
3+
if [[ -f "$PODS_ROOT/../.xcode.env" ]]; then
4+
source "$PODS_ROOT/../.xcode.env"
5+
fi
6+
7+
if [[ -f "$PODS_ROOT/../.xcode.env.local" ]]; then
8+
source "$PODS_ROOT/../.xcode.env.local"
9+
fi
10+
11+
export CONFIG_CMD="dummy-workaround-value"
12+
export CLI_PATH="$("$NODE_BINARY" --print "require('path').dirname(require.resolve('@rnef/cli/package.json')) + '/dist/src/bin.js'")"
13+
14+
WITH_ENVIRONMENT="$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh"
15+
REACT_NATIVE_XCODE="$REACT_NATIVE_PATH/scripts/react-native-xcode.sh"
16+
/bin/sh -c "$WITH_ENVIRONMENT $REACT_NATIVE_XCODE"

0 commit comments

Comments
 (0)