xcodebuild错误:`删除scheme时出错:无法修改数据,因为进程不允许保存。`

4

我正在尝试使用xcodebuild测试一个Swift包。命令如下:

/Applications/Xcode_13.3.1.app/Contents/Developer/usr/bin/xcodebuild test -scheme BokenEngine -destination "platform=iOS Simulator,name=iPhone 11" -enableCodeCoverage YES -derivedDataPath .DerivedData

我可以在我的macOS 12.4和Xcode 13.4.1上执行它,但是当我尝试在GitHub runner上执行相同的命令时,我会收到以下错误:

2022-06-24 08:05:12.553 xcodebuild[1861:25223] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-20103/IDEFoundation/Execution/RunContextManager/IDERunContextManager.m:823
Details:  Error deleting scheme: Cannot modify data because the process disallows saving.
Object:   <IDERunContextManager: 0x600000fd97a0>
Method:   -deleteRunContexts:completionQueue:completionBlock:
Thread:   <_NSMainThread: 0x6000028ec400>{number = 1, name = main}
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
2022-06-24 08:05:12.554 xcodebuild[1861:25223] could not delete old scheme: Error Domain=DVTCustomDataStoringErrors Code=0 "Cannot modify data because the process disallows saving." UserInfo={NSLocalizedDescription=Cannot modify data because the process disallows saving.}

错误链接: https://github.com/boken-engine/boken-engine/runs/7037978166?check_suite_focus=true#step:4:56 更多信息:https://github.com/boken-engine/boken-engine/issues/131


你的 Swift 包是否有捆绑资源?我在 GH Actions 上也遇到了“无法修改数据,因为进程禁止保存”的错误,但是一旦我删除了捆绑资源,它似乎就停止了。 - Andrew Hershberger
1个回答

0

我在GitLab CI上遇到了同样的问题,但只有当我将构建机器更新到Xcode 14时才开始出现这个问题;我从未在早期版本的Xcode上看到过这个问题。

对于我的情况,解决方案似乎是将该Swift包的.xcscheme文件提交到远程存储库中。为了生成方案文件,我必须在Xcode中打开“管理方案”窗口并单击“立即自动创建方案”按钮。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接