xcode 4.2 ios5 codesign failed with exit code 1

时间秒杀一切 提交于 2020-01-02 09:59:01

问题


I've searched all over the google for a solution which works for me... I've tried SO many different suggestions.. but nothing seems to be working.

In xcode 4.2 using ios5 when I try to run the project, I get the following error

    CodeSign /Users/matt/Library/Developer/Xcode/DerivedData/myapp-apjchwtbrxazuighfwhrzxchpcfk/Build/Products/Debug-iphoneos/myapp.app
    cd /Users/matt/Desktop/myapp_v1_1
    setenv CODESIGN_ALLOCATE /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
    setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /usr/bin/codesign --force --sign "iPhone Developer: Richard Sawyer (JCC5D2QGAM)" --resource-rules=/Users/matt/Library/Developer/Xcode/DerivedData/myapp-apjchwtbrxazuighfwhrzxchpcfk/Build/Products/Debug-iphoneos/myapp.app/ResourceRules.plist --entitlements /Users/matt/Library/Developer/Xcode/DerivedData/myapp-apjchwtbrxazuighfwhrzxchpcfk/Build/Intermediates/myapp.build/Debug-iphoneos/myapp.build/myapp.xcent /Users/matt/Library/Developer/Xcode/DerivedData/myapp-apjchwtbrxazuighfwhrzxchpcfk/Build/Products/Debug-iphoneos/myapp.app

/Users/matt/Library/Developer/Xcode/DerivedData/myapp-apjchwtbrxazuighfwhrzxchpcfk/Build/Products/Debug-iphoneos/myapp.app: object file format unrecognized, invalid, or unsuitable
Command /usr/bin/codesign failed with exit code 1

I have tried

  • reinstalling xcode
  • deleting the DerivedData folder
  • adding resource location files (somewhere?!)
  • checking for duplicate info.plist files
  • creating a symm (?) Link to the code sign folder
  • other random little bits and bobs

It seems nothing is working! I don't think I changed anything for this not to work. I was testing on my iPhone 4S, then tried on an iPhone 3G (os 3.1.2) - I actually changed the settings to add armv6, but have tried to change this back with no avail.

I'm not sure what I can do now?!

Thanks for any help.... anything at all!


回答1:


My problem turned out to be the wrong setting in Build Options.

I had entered armv6 and armv7 as settings in there. I changed these back to normal and it built fine.




回答2:


Check the organizer/devices listing of mobile provisionings to make sure you have a provisioning that corresponds to "iPhone Developer: Richard Sawyer (JCC5D2QGAM)" and is valid. In any case, probably want to go through the iTunes Provisioning Portal and follow every direction from the beginning absolutely precisely.




回答3:


Here's the comprehensive DTS Tech Note on all things CodeSigning-related:

https://developer.apple.com/legacy/library/technotes/tn2250/_index.html#//apple_ref/doc/uid/DTS40009933



来源:https://stackoverflow.com/questions/8052925/xcode-4-2-ios5-codesign-failed-with-exit-code-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!