wait, embedded.mobileprovision file is already there when xcode is done building the FooBar.app package.
Are you saying that you remove it from the package and replace with the Ad-Hoc FooBar.mobileprovision file that you download from Apple's developer site?