1 在做 archiving 的适合 ,选择 production-> scheme -> edit scheme-> Archiving , 选择 release ,下面打勾( xcode 5.1)
2 在 target 下面,选择 release 的 code sign ,选择 release 证书, 用于签名的 provisoning file 也要是发布的文件。
3 在 archiving 后,在 orgnizer 里面,选择 adhoc 导出的时候,要选择同样的 provisioning file 。
-------reference
Q: Why must I use the same provisioning profile when archiving and generating my IPA?
A: When your application is compiled, information from the provisioning profile used to codesign your application is embedded in the application executable. When you generate your IPA, your application is codesigned again and the provisioning profile used to codesign is added to the IPA as the embedded.mobileprovision file. If there is a mismatch in certain pieces of information between the profile info in the executable and the profile info in the embedded.mobileprovision, this can cause the install to fail.