运行xcodebuild clean
或
使用react-native-clean-project,其中包括一个命令以及ios清洁命令…
```'rm -rf ios/build && (killall Xcode || true) && xcrun -k && cd ios && xcodebuild -alltargets clean && cd .. && rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache" && rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache" && rm -fr ~/Library/Developer/Xcode/DerivedData/ && rm -fr ~/Library/Caches/com.apple.dt.Xcode/',```
ios构建错误与退出代码65在azure devops或我无法删除构建文件夹,因为它不是由构建系统创建的?这是权限问题吗?我使用上面的包来清理或只是常规的xcodebuild清理。
IDEPackageSupportUseBuiltinSCM = YES
error: Could not delete `/Users/me/repos/Mobile-App/ios/build` because it was not created by the build system.
note: To mark this directory as deletable by the build system, run `xattr -w com.apple.xcode.CreatedByBuildSystem true /Users/me/repos/Mobile-App/ios/build` when it is created.```
Looking for how to prevent this failure to clean the iOS build with react native.
在我的例子中,主要是代码65就因为
<your_app>/ios/build
还存在
解决方案
rm -rf iod/build
并重新运行 或者你可以复制并粘贴
xattr -w com.apple.xcode.CreatedByBuildSystem true <your_app>/ios/build
命令在错误信息上面