Error with duplicate Provisioning Profiles

By : lhan
Source: Stackoverflow.com
Question!

So I am pretty much brand new to iOS development, although I've gone through a couple of basic tutorials. I've never gone as far as publishing an app though. Hopefully, what I describe will make sense to someone who has gone through the process.

I have been tasked with updating our iOS app as the previous developer is no longer with the company and I am having a hard time even deploying the existing app to our iPad to debug and test. Both the Mac and iPad I am using were previously used by the developer who left, although I created an AppleID for myself and was invited to the team by the admin, so I have access to all the devices/profiles/certificates on the dev portal.

The problem:

The project builds successfully, but throws an error that the app can't be installed because:

the provisioning profile can't be found for the executable.

OK, so it turned out our profile had expired and I was able to regenerate, download, and install it. But the error still happens. After much googling and attempts at fixing this I have the following scenario now:

  1. I have removed all provisioning profiles from the iPad itself. I saw an article where someone said to do that, and that they could be re-downloaded later.

  2. If I download any of the previous provisioning profiles, and (from within XCode), if I go to Window -> Devices, right click on the device and select "View Provisioning Profiles", and add the downloaded profile to the list, it acts like it is successful, but never shows up in the list? Is this because the device wasn't present in the list on the developer port? Which leads me to...

  3. I cannot get this device added to the list of available devices under Certificates, Identifiers & Profiles on developer.apple.com. I first thought this iPad was not in the list because I didn't see the name in there (apparently the name on the ipad changed), so I tried to add it, but got an error that a device with that UDID already existed in the list. So I looked, and there were TWO devices already in the list, with the exact same UDID. Not sure how this is possible, if I can't add one with the same UDID? So I disabled both of the duplicates, thinking this would let me add the new entry. Nope, same error. And now, I can't even re-enable EITHER of the other two which I previously disabled because a device with the same UDID already exists in the list!

Is there any way to remove a duplicate device UDID from the devices list on the dev portal or is my only option finding a different device to test with?

By : lhan


Answers

same problem occured once when the certificates expired, but my solution was : go to folder "~/Library/MobileDevice/Provisioning Profiles" to delete all the certificates, then download the active certificates again , install them. Guess it's Xcode's bug to verify the newly generated certificate and the expired one.



This video can help you solving your question :)
By: admin