iosreact-nativexcode10.1

IOS build stack indefinitely on section "Bundle React Native code and images"


We have updated our React-Native project from RN55 to RN59 and since then, I cannot build IOS using FastLane gym. I can build and run the app from XCode, but running from the CI using FastLane it seems to stack on section "Bundle React Native code and images" just after "the transform cache was reset."

I have tried the following without success:

  1. Adding variable as follows

    export NODE_OPTIONS="--max-old-space-size=4096"

  2. Removed node_modules, clearing yarn cache, running scripts/ios-install-third-party.sh and configure on glog-0.3.5

  3. Deleted watchman cache and clearing $TMPDIR folder for react, haste and metro

The following command is executed:

xcodebuild 
-workspace ./ios/myApp.xcworkspace 
-scheme myapp 
-destination 'generic/platform=iOS' 
-archivePath /Users/Shared/myApp/app/output/myapp\ 2019-08-27\ 18.13.05.xcarchive 
-derivedDataPath '/Users/Shared/myApp/app/derivedData'
-UseModernBuildSystem=0 
clean archive

On Xcode I have the following script on "Bundle React Native code and images" - Also tried without NODE_OPTIONS

export NODE_BINARY=node
export NODE_OPTIONS="--max_old_space_size=4096"
../node_modules/react-native/scripts/react-native-xcode.sh

NodeJS version: 10.16.0

xCode version 10.1

Mojave 10.14.4

I do not get any error but the ipa is never generated.


Solution

  • After days of searching I have found the solution here:

    https://github.com/getsentry/sentry-react-native/issues/422

    I have added < /dev/null

    in the end of the script on "Bundle React Native code and images"

    EDIT: Pasting here the last part of the code, the bit that I have modified:

    if ["${CONFIGURATION}" != "Debug" ]; then
        ../node_modules/@sentry/cli/bin/sentry-cli react-native xcode \
        ../node_modules/react-native/scripts/react-native-xcode.sh < /dev/null
    else
        ../node_modules/react-native/scripts/react-native-xcode.sh < /dev/null
    fi