xcodereact-nativexcode-cloud

React native app not building on Xcode-Cloud


React native app not building on Xcode-Cloud getting following error

Run command: 'source /Volumes/Task/ci_build.env && source /Volumes/Task/ci_plan.env && xcodebuild archive -workspace /Volumes/workspace/repository/ios/dxapp.xcworkspace -scheme dxapp -destination generic/platform=iOS -archivePath /Volumes/workspace/build.xcarchive -derivedDataPath /Volumes/workspace/DerivedData -resultBundleVersion 3 -resultBundlePath /Volumes/workspace/resultbundle.xcresult -resultStreamPath /tmp/resultBundleStream9b0391b8-52bb-4b1d-9d33-db7809b56ceb.json -IDEPostProgressNotifications=YES CODE_SIGN_IDENTITY=- AD_HOC_CODE_SIGNING_ALLOWED=YES CODE_SIGN_STYLE=Automatic DEVELOPMENT_TEAM=4SJTADTF44 COMPILER_INDEX_STORE_ENABLE=NO -hideShellScriptEnvironment'

enter image description here

Development Machine Environment

System:
    OS: macOS 12.0.1
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    Memory: 4.41 GB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.8.0 - /usr/local/bin/node
    Yarn: 1.22.11 - /usr/local/bin/yarn
    npm: 7.21.0 - /usr/local/bin/npm
    Watchman: 2021.08.30.00 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0
  IDEs:
    Android Studio: 2020.3 AI-203.7717.56.2031.7784292
    Xcode: 13.1/13A1030d - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0 
    react-native: 0.61.5 => 0.61.5

Update

I have tried ios/ci_post_clone script

#!/bin/sh


brew install node
brew install cocoapods
npm install
pod install

However, the issue remains. How should I build my app?


Solution

  • The following script in your ios/ci_scripts/ci_post_clone.sh file to install Node, CocoaPods, yarn, and their dependencies using Homebrew:

    #!/bin/sh
    
    # Install Node, CocoaPods, and yarn using Homebrew.
    brew install node
    brew install cocoapods
    brew install yarn
    
    # Install dependencies
    yarn
    pod install
    

    And then, open terminal, go to ci_scripts directory to make it an executable by running chmod +x ci_post_clone.sh