views:

189

answers:

2

I get this codesign error when i build the application

codesign: unrecognized option `--entitlements'

Usage: codesign -s identity [-fv*] [-o flags] [-r reqs] [-i ident] path ... # sign
       codesign -v [-v*] [-R testreq] path|pid ... # verify
       codesign -d [options] path ... # display contents
       codesign -h pid ... # display hosting paths
       codesign: unrecognized option `--entitlements'
Usage: codesign -s identity [-fv*] [-o flags] [-r reqs] [-i ident] path ... # sign

Build failed (1 error)

Can anyone please help me to resolve it

+1  A: 

I've never seen that one before but it suggests that something is broken in your Xcode installation. If codesign doesn't know about the -entitlements option, it's either an old version or maybe one that didn't come from the iPhone SDK. This might happen if, for example, you've recently installed an older copy of the developer tools. It might happen for other reasons-- never having seen it before I can't be completely sure.

You could investigate the problem by using xcode-select at the command line. Something like this:

% xcode-select -print-path
/Developer

It prints the path to the current version of Xcode used by command-line tools (like codesign) and it should point toward your copy of the iPhone SDK. If it doesn't, you can change it via xcode-select -switch /path/to/SDK'.

It may be easier to just reinstall the iPhone SDK, though if it was me I'd want to investigate it and understand what went wrong.

Tom Harrington
I tried reinstalling the SDK but didnt work
Muniraj
A: 

I updated to the latest xcode version and updated the latest updates for mac leopard. and it worked fine.

Muniraj