Multiple targets and multiple provisioning profiles in XCode
I am creating two targets of my app (a free and a paid version) and cannot make XCode use the p开发者_开发技巧roper provisioning profile for the debug built of one of these versions. It attempts to use the profile of the paid one for both version, and obviously fails since the bundle ID does not match.
In the 'Get Info' build settings for each target I can select the provisioning profile explicitly only if the configuration is set to 'Distribution'. That's not very helpful because I use a wildcard profile for distribution anyway. As soon as I switch to 'Debug' settings, it only lets me select the signing certificate, like "iPhone Developer: My Name (cert id here)", but not the specific provisioning profile, like "iPhone Developer: My Name (cert id here) profile-id-here".
I tried pasting the "iPhone Developer: My Name (cert id here) profile-id-here" manually by selecting "Other" in the code signing identity field, but it tells me:
Code Sign error: The identity 'iPhone Developer: My Name (cert id here) profile-id-here' doesn't match any valid certificate/private key pair in the default keychain
This does not make a lot of sense, since the certificate used for both profiles is the same and works fine for the other one.
I think it was not like that when I tried it in XCode 3.2.2 but having updated to 3.2.3 for the iOS4 support, that's the only thing I can get.
You might have accidentally moved your certs elsewhere in the keychain. The certs should be inside the "login" keychain and not system or elsewhere
Have you set the Active Target AND Active Executable to the free version?
精彩评论