React native app not building on Xcode-Cloud

Viewed 564

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

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

still same issue.

How to resolve this issue.

1 Answers

As you can see from the logs Xcode Cloud environment couldn't find ci_post_clone script file.

Make sure the following.

  1. Make sure ci_post_clone.sh file is at the correct path ios/ci_scripts/ci_post_clone.sh (ci_scripts directory must be in ios directory not at the root of the project)

  2. ci_post_clone.sh should be executable.

    (Run this command in terminal chmod +x ci_post_clone.sh)

  3. ci_post_clone.sh is added and pushed to the git.

Related