If you're getting the following message:
"Invalid Code Signing Entitlements - The signature for your app bundle contains entitlement values that are not supported. For the com.apple.developer.ubiquity-container-identifiers entitlement, the first value in the array must consist of the prefix provided by Apple in the provisioning profile followed by a bundle identifier suffix. The bundle identifier must match the bundle identifier for one of your apps or another app that you are permitted to use as the iCloud container identifier."
then you will need to follow the instructions in this Stack Overflow question - http://stackoverflow.com/questions/6427735/invalid-code-signing-entitlements