【问题标题】:XCode code siging error XCTestXCode 代码签名错误 XCTest
【发布时间】:2014-12-15 11:08:10
【问题描述】:

当我尝试在模拟器上运行我的应用程序时,一切正常。但是当我尝试构建它以在真实设备上测试它时,我收到以下错误:

CodeSign /Users/fvoordeckers/Library/Developer/Xcode/DerivedData/MyProject-##########/Build/Products/Debug-iphoneos/MyProject.xctest
cd /Users/fvoordeckers/Documents/Projecten/MyProject/iOS
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"

Signing Identity:     "iPhone Developer: Frederik (########)"

/usr/bin/codesign --force --sign ##################/Users/fvoordeckers/Library/Developer/Xcode/DerivedData/MyProject-##########/Build/Products/Debug-iphoneos/MyProject.xctest

/Users/fvoordeckers/Library/Developer/Xcode/DerivedData/MyProject-##########/Build/Products/Debug-iphoneos/MyProject.xctest: bundle format unrecognized, invalid, or unsuitable

Command /usr/bin/codesign failed with exit code 1

我已将 ID 更改为 #。我创建了一个配置文件,其中包括我正在使用的设备和所有必需的证书。应用程序似乎没有问题,但 xctest ......我也尝试将“--deep”标志添加到签名配置中,但它没有帮助......

【问题讨论】:

  • 您是否在项目级别、应用目标级别或测试目标级别更改了构建设置?

标签: ios xcode xcode6 code-signing-certificate


【解决方案1】:

在 xcode 中转到 Edit Scheme -> 在 Build Target -> 完全删除 MyProject.xctest取消选中 MyProject.xctest 的所有框 Analyze , Test 等。

清理您的项目,然后在设备上运行

【讨论】:

  • 如果我没有 MyProject.xctest 但仍然出现同样的错误?
  • 你能解释这是为什么吗?
  • 谢谢 - 我可以确认,如果您忽略清理构建,那么即使您取消选中各个框,此错误仍然会持续存在。清理构建可以帮助您克服错误。
【解决方案2】:

我遇到了同样的问题,但没有任何帮助(更新方案、更改配置文件或代码签名身份等)除了将 Xcode 更新到最新的 beta 版本:Xcode 7.3测试版 4

我猜苹果在这个新版本中做了一些重大改进:)

【讨论】:

    猜你喜欢
    • 2012-07-08
    • 2017-01-18
    • 1970-01-01
    • 2012-02-10
    • 2011-04-17
    • 2017-01-28
    • 2013-09-20
    • 2010-12-05
    相关资源
    最近更新 更多