Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(scripts): Support multiple bundles in react-native-xcode.sh (#46339
) Summary: This enables projects to have multiple bundles built during the Xcode bundling phase (e.g. for projects where you might have a PhoneScene and a CarPlayScene each with their own RootView and bundle, if you're using [react-native-carplay](https://github.com/birkir/react-native-carplay)). ## Changelog: [IOS] [ADDED] - User-configurable BUNDLE_NAME when building bundles Pull Request resolved: #46339 Test Plan: Built my project with the following Xcode "Bundle React Native code" build step: ```sh set -e export SOURCEMAP_FILE="$(pwd)/../main.jsbundle.map"; SOURCEMAP_FILE="$(pwd)/../main.jsbundle.map" WITH_ENVIRONMENT="../node_modules/react-native/scripts/xcode/with-environment.sh" REACT_NATIVE_XCODE="../node_modules/react-native/scripts/react-native-xcode.sh" /bin/sh -c "BUNDLE_NAME=main $WITH_ENVIRONMENT $REACT_NATIVE_XCODE" /bin/sh -c "BUNDLE_NAME=carplay $WITH_ENVIRONMENT $REACT_NATIVE_XCODE" ``` Then launched the app with a modified `AppDelegate.swift` which loaded main.jsbundle into one RootView and carplay.bundle into another RootView. Reviewed By: cortinico Differential Revision: D62577314 Pulled By: cipolleschi fbshipit-source-id: 22312ca144146da6c71a8533a1883e720aff1e85
- Loading branch information