This assumes you have already created your adhoc distribution profile and installed it into Xcode
Note that you might find references to blog posts where they suggest you create an Entitlements.plist and add an entry called
get-task-allow set to false. This used to be required, but is not any longer.
No valid code signing identity found This can happen if you haven't installed the distribution certificate. Look in Keychain Access on OS X, under the My Certificates section you should see your "Distribution" certificate with a private key below it. If not, you'll need to retrieve this private key from a previous export, or regenerate it from the portal.
App was signed with improper entitlements This usually means either you have an Entitlements.plist with improper settings (you can delete this file if you're not using it for some other settings like iCloud or Push Notifications). It can also mean that your device was not part of the profile.