Xcode 10,iOS:即使所有测试都通过,测试构建也会失败

时间:2018-09-28 14:19:52

标签: ios xcode continuous-integration xcode10

我所有的单元测试都通过了,但是测试构建失败了。在日志中,我得到了。

MyApp.app (35810) encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. Underlying error: Test session exited(1) without checking in.)

在检查以下链接时,我了解到以上错误只是一般性错误,实际的日志文件将对错误进行更好的描述。

https://github.com/fastlane/fastlane/issues/6968#issuecomment-284421316

在日志文件中,我得到:-

/Users/swasidhant.chowdhury/Library/Developer/CoreSimulator/Devices/DB36B628-072F-483A-A285-F3BC6E56EEC6/data/Containers/Bundle/Application/DEE2984D-B18B-4331-A298-E04423EF297C/MyApp.app/Frameworks/libswiftXCTest.dylib" UserInfo={NSLocalizedFailureReason=The bundle couldn’t be loaded., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=/Users/swasidhant.chowdhury/Library/Developer/Xcode/DerivedData/MyAppWS-hdqtqxlvnzxcrhfksajhjcsdpwww/Build/Products/Debug-iphonesimulator/MyApp.app/PlugIns/MyAppTests.xctest/MyAppTests, NSDebugDescription=dlopen(/Users/swasidhant.chowdhury/Library/Developer/Xcode/DerivedData/MyAppWS-hdqtqxlvnzxcrhfksajhjcsdpwww/Build/Products/Debug-iphonesimulator/MyApp.app/PlugIns/MyAppTests.xctest/MyAppTests, 265): Symbol not found: __T0So8NSObjectCs7CVarArg10ObjectiveCWP
  Referenced from: /Users/swasidhant.chowdhury/Library/Developer/CoreSimulator/Devices/DB36B628-072F-483A-A285-F3BC6E56EEC6/data/Containers/Bundle/Application/DEE2984D-B18B-4331-A298-E04423EF297C/MyApp.app/Frameworks/libswiftXCTest.dylib

我在'__T0So8NSObjectCs7CVarArg10ObjectiveCWP'上找不到任何内容我必须更改任何构建设置才能使其正常工作吗?我需要做任何链接吗?

1 个答案:

答案 0 :(得分:0)

您是否尝试过删除“派生数据”文件夹?这就为我解决了这个问题。如果您使用Xcode 10编译应用程序,似乎libswiftXCTest.dylib不应包含在应用程序包中。