Xcode:xctest 无法创建表示捆绑包实例,错误 13,无法读取 version.plist

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

当尝试运行 Swift 包的测试套件时,我遇到以下失败:

xcodebuild[60213:11378051]  IDETestOperationsObserverDebug: Failure collecting logarchive: Error Domain=OSLogErrorDomain Code=13 "Log archive creation failed with error 13, warnings during creation: failed to read version.plist
" UserInfo={NSLocalizedDescription=Log archive creation failed with error 13, warnings during creation: failed to read version.plist

再往下,我收到此错误:

xctest (80034) encountered an error (Failed to create a bundle instance representing '/Users/johannes/Library/Developer/Xcode/DerivedData/my-package-aatalanyrvxunnffoupjofekslfp/Build/Products/Debug/MyPackageTests.xctest'. Check that the bundle exists on disk.)

这是我用来执行测试的命令:

xcodebuild -sdk iphonesimulator -configuration Debug -scheme MyPackage -destination "platform=iOS Simulator,name=iPhone 13" clean test CODE_SIGNING_ALLOWED=NO
swift xcode xctest xcodebuild swift-package
1个回答
0
投票

解决方案非常简单:确保指定有效的模拟器名称。我指定了“iPhone 13”,但更新到 Xcode 15 后,具有该名称的模拟器不再存在。更改为“iPhone 15”后,一切正常。

多么具有误导性和晦涩的错误消息!

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