当我尝试在模拟器上运行我的应用程序时,一切正常.但是当我尝试构建它以在真实设备上测试它时,我收到以下错误:
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’标志,但它没有帮助…
解决方法
转到xcode中的Edit Scheme – >在Build Target中 – >完全删除MyProject.xctest或取消选中MyProject.xctest Analyze,Test等的所有框.
清理项目,然后在设备上运行.