【问题标题】:React native app not building on Xcode-CloudReact 本机应用程序不在 Xcode-Cloud 上构建
【发布时间】:2022-01-16 15:58:33
【问题描述】:

未在 Xcode-Cloud 上构建的 React 本机应用程序出现以下错误

错误

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'

开发机环境

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

更新

我试过ios/ci_post_clone脚本

#!/bin/sh


brew install node
brew install cocoapods
npm install
pod install

还是同样的问题。

如何解决此问题。

【问题讨论】:

    标签: xcode react-native xcode-cloud


    【解决方案1】:

    从日志中可以看到 Xcode Cloud 环境找不到ci_post_clone 脚本文件。

    确保以下内容。

    1. 确保ci_post_clone.sh 文件位于正确的路径ios/ci_scripts/ci_post_clone.sh(ci_scripts 目录必须在ios 目录中,而不是在项目的根目录中)

    2. ci_post_clone.sh 应该是可执行的。

      (在终端chmod +x ci_post_clone.sh运行此命令)

    3. ci_post_clone.sh 被添加并推送到 git。

    【讨论】:

      猜你喜欢
      • 2023-03-18
      • 2020-05-23
      • 2019-06-18
      • 2020-08-06
      • 1970-01-01
      • 1970-01-01
      • 2018-11-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多