问题
Having issues doing this.
It will NOT let me select the provisioning profile to use, instead it defaults to some XC Ad Hoc: * and I cannot change it. The correct profile is selected in the build settings.
I get:

回答1:
I was experiencing the same issue in Xcode 6. I fixed it by:
- Go to Apple Developer > Create a new App ID specifically for the app with Explicit App ID like com.mywebsite.MyApp. Don't choose Wildcard App ID option.
- Go to Provisioning Profiles > Distribution > Update App ID (for MyApp) to the new one I just created.
- Generate a new profile.
- Download and install.
- It doesn't hurt to Clean before Archive.
- Go to Organizer > Export > Save for Ad Hoc Deployment. Xcode will give me an error on the first attempt. I had to click Try Again. That's when it started to pick up the new profile.
Also this thread might be helpful. Good luck.
来源:https://stackoverflow.com/questions/26522793/selecting-a-provisioning-profile-for-ad-hoc-distribution-in-xcode-6