React Native - Xcode - DerivedData - Pods - ExpoModules

问题描述 投票:0回答:2

xcode 或 xcode pod 究竟如何缓存?

我已经进行了更改以更新本机反应,或者每次我进行博览会更改或某些软件包时。我的项目不是 expo 项目,但我使用的是 expo SDK。

Expo 44-45,React Native 67.3 尝试更新到 68.5

我的 pod install 命令安装了所有错误的依赖项。

我收到 CompileC --> DerivedData 或 iPhone 部署目标错误或模拟器缓存问题。

我删除了派生数据和所有内容,但 pod 仍然安装了所有错误的 pod。

我知道错误的原因,但我不确定为什么如果我运行 npm i 和 pod install ,它会安装所有以前缓存的 pod。

现在我得到:

Error: Command failed: xcrun simctl list --json devices
xcrun: error: unable to find utility "simctl", not a developer tool or in PATH

    at checkExecSyncError (node:child_process:885:11)
    at Object.execFileSync (node:child_process:921:15)
    at runOnSimulator (/Users/me/repos/MobileApp/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:167:54)
    at Object.runIOS [as func] (/Users/me/repos/MobileApp/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:121:12)
    at Command.handleAction (/Users/me/repos/MobileApp/node_modules/@react-native-community/cli/build/index.js:192:23)
    at Command.listener (/Users/me/repos/MobileApp/node_modules/commander/index.js:315:8)
    at Command.emit (node:events:513:28)
    at Command.parseArgs (/Users/me/repos/MobileApp/node_modules/commander/index.js:651:12)
    at Command.parse (/Users/me/repos/MobileApp/node_modules/commander/index.js:474:21)```

xcode react-native cocoapods
2个回答
0
投票
  1. 删除 iOS 文件夹中的 pod 文件夹podfile.lock 文件
  2. 运行此命令
    pod install

0
投票

我在运行反应本机应用程序时遇到了同样的问题(没有博览会)。我按下“清理构建文件夹”按钮,然后 XCode 无法从 DerivedData 文件夹中找到文件。我确实尝试了Samuel Lee所说的,并删除了缓存的pod,但仍然有同样的错误。

最终为我解决问题的是重新启动我的笔记本电脑😂。

然后运行:

cd /ios
rm -rf Pods
rm -rf Podfile.lock
pod install

之后,我打开 XCode,等待项目构建并自行索引。最后运行应用程序(按“启动活动方案”按钮)

就是这样。

© www.soinside.com 2019 - 2024. All rights reserved.