react-native-ui-lib
react-native-ui-lib copied to clipboard
Can not build from xcode
I am able to run demo app on emulator by running 'npm run ios' successfully following steps from docs but when I am trying to run demo app on device from xcode I get build error:
error The resource ..../react-native-ui-lib/index.js was not found.
Can run demo on emulator from xcode. After running on emulator trying to run on device with Run without building and getting 'No code signature found.'
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Why this happen:
The reason is in node_modules/react-native/scripts/react-native-xcode.sh:
if [[ "$PLATFORM_NAME" == *simulator ]]; then
if [[ "$FORCE_BUNDLING" ]]; then
echo "FORCE_BUNDLING enabled; continuing to bundle."
else
# 👇 here
echo "Skipping bundling in Debug for the Simulator (since the packager bundles for you). Use the FORCE_BUNDLING flag to change this behavior."
exit 0;
fi
else
echo "Bundling for physical device. Use the SKIP_BUNDLING flag to change this behavior."
fi
So in simulator environment, entryfile will be resolved when running app and its name was determined by return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"demo"]; in AppDelegate.mm
Resolution:
Because metro.config.js not support config entry file path, so we need manully set ENTRY_FILE env to solve this:

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.