Cannot add provisioning profile to any devices with Xcode

Hello. I have an iOS app written in Xamarin, but this issue is not related to Xamarin or Visual Studio. I am trying to deploy my xamarin app onto an iOS device, but I am unable to get the iOS device to install the provisioning profile via Xcode. I work at a company with a decent variety of test devices and the result seems to be the same from iPads to iPods to iPhones of various ages.

I have created a certificate and a provisioning profile. The certificate is associated with the provisioning profile on the developer portal. I have imported the certificate (including private keys) into my login keychain on MacOS. I have the .mobileprovision file downloaded to the machine. I am signed into Xcode with my apple developer account.

In Xcode, i went to Window > Devices and Simulators and selected my device. I right clicked my device and selected "Show Provisioning Profiles". I clicked the plus and chose my .mobileprovision file. I get the same error on every device:

Failed to install one or more provisioning profiles on the device.

Please ensure the provisioning profile is configured for this device. If not, please try to generate a new profile.|

this is an incredibly vague and unhelpful error. I'm not really sure what it means by "configured for this device". Not sure where to go from here

Answered by GNUGradyn in 721617022

Hello, this was caused by the version of XCode being too old for the version of iOS. This caused XCode to be unable to apply the provisioning profile.

It is annoying that the current production version on the apple app store of XCode does not support the latest production version of iOS. Apple should make sure they match or at least show an error if it cannot provision a profile due to an unsupported version

That error suggests that your device is simply not included in the profile. If you dump the profile’s device list, using the instructions in The where section of TN3125 Inside Code Signing: Provisioning Profiles, what do you see?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Given those results I’m out of ideas. I recommend that you seek formal support via Apple > Developer > Contact Us.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

Hello, this was caused by the version of XCode being too old for the version of iOS. This caused XCode to be unable to apply the provisioning profile.

It is annoying that the current production version on the apple app store of XCode does not support the latest production version of iOS. Apple should make sure they match or at least show an error if it cannot provision a profile due to an unsupported version

Apple should make sure they match

And that’s exactly what we do. I’m not sure what’s going wrong in your particular case but the current released version of Xcode (13.4.1) supports the current released version of iOS (15.6). I just tested that setup here in my office and it works as expected.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

我们遇到了相同的问题。情况大致是这样:

设备类型:iPhone6s 系统版本:iOS13.6.1 xcode版本:Version 14.3 (14E222b)

我已经确认 development.mobileprovision 文件中包含这台iPhone6s的UDID,证书也没有过期,双击 development.mobileprovision 文件,提示如下错误:

Try this:

  1. Quit Xcode
  2. Go to ~/Library/MobileDevice/Provisioning Profiles/
  3. Delete all provisioning profiles that are expired
  4. Move the new provisioning profile into the directory
  5. Launch Xcode

I'm going to post this in multiple places as I just went through this dance and NONE of the advice worked. iOS 17.3.1 and XCode15.2. I think the precipitating issue was that my provisioning profile expired.

I restarted, wiped DerivedData, created new certs, new profiles, double-checked the device was included in the list, had a happy thought when the device list needed its annual reset ... all the advice here and elsewehere didn't fix.

What DID seem to turn the corner was simply building a new app with XCode managing signing and running it on the device!

When I did that, before it deployed to the device, I got the Codesign auth popup on Mac so it could have access to the keychain.

After authorising and running that app from XCode, I was able to deploy my app to device!

Cannot add provisioning profile to any devices with Xcode
 
 
Q