Creating a provisioning profile and certificate to download or distribute an iPhone app
If the provisioning profile (.mobileprovision) and certificate (.cer) are not configured correctly you might get the following error when clicking Build > Build in XCode: Code Sign error: The identity ‘iPhone Developer’ doesn’t match any valid certificate/private key pair in the default keychain