React Native iOS build hangs using CLI but works with Xcode

36 views Asked by At

I am learning React Native CLI, and came across this issue where I can run the app using Xcode's "Play" button in a simulator, but not when using the CLI command.

For CLI, I ran the command npx react-native run-ios --scheme bob-dev-local --configuration dev.debug, then pressed i to run the iOS app.

Here are the partial logs generated, which hangs at /Build/Inter.

export ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_WARNINGS=YES
export ASSETCATALOG_COMPILER_GENERATE_OBJC_ASSET_SYMBOLS_PATH=/Users/bob/Library/Developer/Xcode/DerivedData/alice-123/Build/Intermediates.noindex/alice.build/prod.release-iphonesimulator/alice.build/DerivedSources/GeneratedAssetSymbols.h
export ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOLS_PATH=/Users/bob/Library/Developer/Xcode/DerivedData/alice-123/Build/Inter

However, when I do the same using Xcode, the logs are as below, before proceeding to finish and launch the app in the simulator.

export ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_WARNINGS=YES
export ASSETCATALOG_COMPILER_GENERATE_OBJC_ASSET_SYMBOLS_PATH=/Users/bob/Library/Developer/Xcode/DerivedData/alice-123/Build/Intermediates.noindex/alice.build/prod.release-iphonesimulator/alice.build/DerivedSources/GeneratedAssetSymbols.h
BUNDLE  ./index.js 

As you can see above, Xcode did not even have the export of ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOLS_PATH, which seems to cause the issue for CLI. I am not sure where this export comes from, as it is not one of the environment variables nor found anywhere in the code.

Does anyone know what could cause such a discrepancy between Xcode and CLI, or how to troubleshoot this?

Much appreciated,

0

There are 0 answers