1

在使用 Xcode 5 在设备上运行应用程序时出现此错误

这是完整的错误

CodeSign /Users/Nevo/Library/Developer/Xcode/DerivedData/RecipesBook-efcrcmgnkaitsqaxahtumfbdxtmb/Build/Products/Debug-iphoneos/RecipesBook.app
    cd "/Users/Nevo/Desktop/RecipesBook for ios 7 and 6"
    setenv CODESIGN_ALLOCATE "/Applications/Xcode 2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate"
    setenv PATH "/Applications/Xcode 2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode 2.app/Contents/Developer/usr/bin‭:‬‭/‬usr/bin‭:/‬bin‭:/‬usr/sbin‭:/‬sbin"
    Using code signing identity "iPhone Distribution: Shay Shalev (QN94KCWC64)" and provisioning profile "ProfileRecipeBook" (52D189D8-2FFD-4939-A3C6-1CD1F8B645E0)
    codesign --force --sign 4F0E5397A87B47EE07EC3288681661CBCBB4781C --resource-rules=/Users/Nevo/Library/Developer/Xcode/DerivedData/RecipesBook-efcrcmgnkaitsqaxahtumfbdxtmb/Build/Products/Debug-iphoneos/RecipesBook.app/ResourceRules.plist --entitlements /Users/Nevo/Library/Developer/Xcode/DerivedData/RecipesBook-efcrcmgnkaitsqaxahtumfbdxtmb/Build/Intermediates/RecipesBook.build/Debug-iphoneos/RecipesBook.build/RecipesBook.xcent /Users/Nevo/Library/Developer/Xcode/DerivedData/RecipesBook-efcrcmgnkaitsqaxahtumfbdxtmb/Build/Products/Debug-iphoneos/RecipesBook.app

error: can't exec 'codesign' (No such file or directory)
4

3 回答 3

5

codesign我从复制/usr/bin/ 到: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u‌​sr/bin

它对我有用。

于 2013-09-26T21:53:12.917 回答
0

解决了我的问题,谢谢帮助。问题出在我的道路上。我已经通过 /etc/launchd.conf 设置了我的路径,我正在疯狂地试图通过 ~/.bashrc 等编辑我的路径。确保 /usr/bin 在 xcode 选择的路径中。这个页面让我想起了:http: //overwatering.org/blog/2012/08/setting-path-osx-mountain-lion/

于 2013-09-17T18:31:47.197 回答
0

我是 cpp 的新手,所以我确信这个解决方案并不适用于所有人,而且我确信在某些情况下有很多理由不这样做。

我的解决方案是禁用签名:

构建设置>>签名>>代码签名身份>>将此设置为“不要代码签名”

于 2018-07-18T23:23:20.857 回答