代码签名错误 - codesign:未知错误:-22

时间:2014-06-30 02:32:46

标签: ios xcode xcode5 codesign

当我尝试在真实设备上运行我的应用时,我收到此错误。有谁能帮我解决?

PS。配置和签名身份设置正确..事实上,直到几个小时前一切正常

CodeSign /Users/user/Library/Developer/Xcode/DerivedData/MilitariTest-eckbgmqsefbhupgakvywpmavdthi/Build/Products/Debug-iphoneos/MilitariTest.app
    cd /Users/user/Desktop/MilitariTest/MilitariTest
    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"
    Using code signing identity "iPhone Developer" and provisioning profile "iOS Team Provisioning Profile" (XXXXX)
    /usr/bin/codesign --force --sign XXXXX --resource-rules=/Users/user/Library/Developer/Xcode/DerivedData/MilitariTest-eckbgmqsefbhupgakvywpmavdthi/Build/Products/Debug-iphoneos/MilitariTest.app/ResourceRules.plist --entitlements /Users/user/Library/Developer/Xcode/DerivedData/MilitariTest-eckbgmqsefbhupgakvywpmavdthi/Build/Intermediates/MilitariTest.build/Debug-iphoneos/MilitariTest.build/MilitariTest.xcent /Users/user/Library/Developer/Xcode/DerivedData/MilitariTest-eckbgmqsefbhupgakvywpmavdthi/Build/Products/Debug-iphoneos/MilitariTest.app

sh: /usr/bin/codesign: Unknown error: -22

我终于找到了解决方案,我不得不重新安装mac os x,现在一切运行良好,没有对项目进行任何更改

1 个答案:

答案 0 :(得分:0)

只是尝试删除您的派生数据。

  • 有两种方法可以删除您的应用衍生数据。
  • 1)转到此路径按 shift + Commmand + G 并输入此路径
    在那里你会发现你的应用程序文件夹只是删除,不用担心。

    <强>〜/库/开发商/ Xcode中/ DerivedData

  • 2)从Xcode窗口&gt;组织者&gt;项目&gt;选择您的应用并按 删除即可。