【问题标题】:Error running XCTest for Swift/Obj-c project (Error 83)为 Swift/Obj-c 项目运行 XCTest 时出错(错误 83)
【发布时间】:2016-05-16 20:27:07
【问题描述】:

我在尝试为我的 Swift/Obj-c 应用程序运行测试时遇到以下错误:

    2016-02-07 00:02:26.752 xctest[3275:115122] The bundle “MyAppTests” couldn’t be loaded. Try reinstalling the bundle.
2016-02-07 00:02:26.752 xctest[3275:115122] (dlopen(/Users/raphaelcruzeiro/Library/Developer/Xcode/DerivedData/MyApp-bjdolynlskqvavgryvznzbluqele/Build/Products/Debug-iphonesimulator/MyAppTests.xctest/MyAppTests, 265): Symbol not found: _CLSDevelopmentPlatformNameKey
  Referenced from: /Users/raphaelcruzeiro/Library/Developer/Xcode/DerivedData/MyApp-bjdolynlskqvavgryvznzbluqele/Build/Products/Debug-iphonesimulator/MyAppTests.xctest/MyAppTests
  Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/xctest
 in /Users/raphaelcruzeiro/Library/Developer/Xcode/DerivedData/MyApp-bjdolynlskqvavgryvznzbluqele/Build/Products/Debug-iphonesimulator/MyAppTests.xctest/MyAppTests)
Program ended with exit code: 83

这是一个相当大的应用程序,它不使用框架,因为如果这有什么不同的话,我需要支持 iOS 7。该应用程序没有测试。我现在刚刚创建了第一个测试套件。

【问题讨论】:

  • 我在项目中添加的外部非动态框架出现此错误。这些解决方案都不适合我。

标签: ios objective-c xcode swift xctest


【解决方案1】:

我遇到了同样的问题,这是因为没有设置主机应用程序。 我不知道它为什么会被重置,但这是有道理的,因为 swift 文件不在测试目标中。

【讨论】:

    【解决方案2】:

    在为此打了几次头之后,我决定删除测试目标并从头开始重新创建它。这解决了我的问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-05-06
      • 2021-06-19
      • 2020-11-16
      • 2018-05-23
      • 1970-01-01
      相关资源
      最近更新 更多