XCode 代码签名错误 XCTest [英] XCode code siging error XCTest
问题描述
当我尝试在模拟器上运行我的应用程序时,一切正常.但是当我尝试构建它以在真实设备上对其进行测试时,出现以下错误:
When I try to run my application on a simulator, everything works fine. But when I try to build it to test it on a real device, I get the following error:
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"标志,但它没有帮助...
I've changed IDs with #
. I created a provisioning profile that includes the device I'm using and al the required certificates. It doesn't seem to have a problem with the app but with the xctest... I also tried adding the '--deep' flag to the signing configuration but it didn't help...
推荐答案
在 xcode 中转到 Edit Scheme -> 在 Build Target 中 -> 删除 MyProject.xctest 完全或取消选中 MyProject.xctest 的所有框分析、测试等.
Go to Edit Scheme in xcode -> In Build Target -> Remove MyProject.xctest completely or uncheck all the boxes of MyProject.xctest Analyze , Test etc..
清理您的项目,然后在设备上运行.
这篇关于XCode 代码签名错误 XCTest的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!