4

A team member needed to register her device so I added her device to Devices section of Apple Dev Portal. I then created a new ad hoc provisioning profile that includes her device and finally deleted the old provisioning profile. But XCode doesn't seem to see this new provisioning profile: enter image description here

To ensure that Apple is using the latest profile I did this:

rm -rF /Users/etayluz/Library/MobileDevice/Provisioning\ Profiles/

And when I try to build Xcode errors out:

error: Build input file cannot be found: '~/Library/MobileDevice/Provisioning Profiles/dab00c70-5073-403b-ae60-e337afeee7fc.mobileprovision'

How do I get Xcode to use the new ad hoc provisioning profile?

I also clicked on "Download Manual Profiles" in Preferences->Accounts - and that does fetch the new profile that I've created - but Xcode is being stupid and still demanding to use the older profile. How do I get Xcode to point and start looking for new profile?

etayluz
  • 15,920
  • 23
  • 106
  • 151
  • try this very powerful , only rm old provisioning file https://stackoverflow.com/a/49953569/13377344 – aqibGenk Apr 03 '23 at 03:39

2 Answers2

9
  1. Go to ~/Library/MobileDevice/Provisioning\ Profiles/ and delete all the provisioning profiles from there.
  2. Go to XCode > Preferences > Accounts and select the Apple Id.
  3. Click Download All Profiles. And it will download all the provisioning profiles again.
Alka Singla
  • 369
  • 2
  • 7
  • 1
    Thanks, but my question is how to get Xcode to recognize that it needs to use this new provisioning profile. I have no problem getting Xcode to download it – etayluz Jun 14 '19 at 02:09
  • After downloading the new provisioning profile, you have to double click on that. It will automatically import into Xcode. Provisioning profile matches the *bundle identifier*, with the help of identifer, Xcode recognize where to import the new provisioning profile. – Alka Singla Jun 14 '19 at 05:48
  • I had to Delete Derived data and restarting Xcode as well. – M.Othman Jan 27 '20 at 09:06
  • I have double clicked the new provisioning file. but now I am getting Build input file cannot be found: '/Users/Library/MobileDevice/Provisioning Profiles/~~~.mobileprovision'. – Energy Jun 23 '21 at 10:28
0
  1. Go to Xcode->Preferences->Accounts
  2. Select the Apple ID and then select the Team which your app is from.
  3. Click on Download Manual profiles
  4. CMD+Shift+K (Clean Project)
  5. Build Project again (CMD + B)
Simran Singh
  • 445
  • 6
  • 8