Xcode 3.2 provides an awesome new feature under the Build menu, \"Build and Archive\" which generates an .ipa file suitable for Ad Hoc distribution. You can also open the O
You CAN actually resign a build, just as XCode does, so that you can test and ship the same binary. For example in my script (similar to those above) I build my release version signed as an AdHoc build, then I archive that as an IPA for testing, then resign with my distribution cert and create a zip file, which is what I send to Apple. The relevant line is:
codesign -f -vv -s "$DistributionIdentity" "$APPDIR"