Is there a way to give a tester the exact binary that will be uploaded to the App Store to test?
Basically what I want to know is whether it is possible to build the source and then sign it twice: once with for ADHOC distribution and then for App Store distribution.
I got burned by some cached image assets and I want to know if I can prevent this from happening without using a dedicated build project.
Cheers...
You can run codesign
yourself. I should get around to blogging how to re-sign apps at one point, but for the most part, you want to extract the resource rules and entitlements, overwrite MyApp/embedded.mobileprovision and then do something like codesign -f -s 'iPhone Developer' --entitlements=extracted-entitlements-file --resource-rules=extracted-resource-rules
(I may have the syntax slightly wrong).
(Of course, it is not the same "exact binary", since embedded.mobileprovision and the embedded signature differs.)
However, last I checked, you don't need to. iOS does not require that the embedded provisioning profile is installed; it only looks for a "similar" one (so you can add a device to a profile but not have to re-sign all your old builds). I'm not sure what counts as "similar" (same app ID, bundle seed, and entitlements?), but I've been able to run an App Store build by installing the corresponding Ad Hoc provisioning profile.
When you say "burned by some cached image assets", do you mean that it wasn't a clean build? I highly recommend setting up a build server that builds clean builds from clean checkouts; exactly how you go about this is beyond the scope of this answer (we use Buildbot and a pile of scripts), but it seems a lot better than submitting builds generated by a random developer's machine (and it also means I can install random beta SDKs without messing up app submissions).