I have written a script which downloads the Grooveshark DEB and makes it into an ipa.
However, when i get to the point
echo "Resigning binary..."
cp "$script_dir/ResourceRules.plist" Applications/Grooveshark.app/
codesign -f -s "iPhone Developer" Applications/Grooveshark.app/
and that is exactly my point, I NEED TO SIGN IT! I KNOW IT"S NOT SIGNED!
codesign: Applications/Grooveshark.app/: code object is not signed
Anyway, I did more testing and it seems that there is a strange problem with LDID:
any binary which has only been signed with LDID will refuse to be signed with codesign!!!
what I mean is:
compile -> codesign -> LDID -> codesign = OK
compile -> LDID -> codesign = FAIL
My theory is that LDID is leaving un-inited some flag, etc. in the binary that says "I can be signed".
I really need help on this!
download script: http://pastebin.com/9R3ktfy5
resource rules: put in same dir as script: http://www.sendspace.com/file/c7e1wm