I have removed some of the devices from the provisioning profile from apple portal for adhoc distribution and downloaded and installed it in xcode 6. But upon archiving the
I only have this problem when archiving so I do not bother to investigate, unplug the iPhone and archiving works just fine.
I followed a lot of the instructions out there about resetting profiles and restarting xcode but still had no luck. Eventually I set team to 'none' and reset the build configuration as indicated here:
https://developer.apple.com/library/ios/qa/qa1814/_index.html
Bingo.
This was for a project I hadn't updated in a year or so and I had just updated to xcode 7.3.
I just had this error as well. I am not sure if all of these steps are required, but the is exactly what I did to fix it, and it worked for me...
At this point, my warning next to "Team" went away. I then tried to run my app on the problem iOS device again and it worked as expected.
I hope that by following these steps, it will at least help you get closer to fixing your problem.
I had a similar problem where my device was properly registered and had been working for some time before suddenly stopping. All of the provisioning profiles were up to date and I was still able to download other Xcode projects onto my device. My developer account was listed as the Team under Targets -> General -> Team but it still wouldn't work. So I switched Team to None and attempted to build the Project again. It gave me an error for not selecting a valid Team, but then an option popped up to choose one of the ones registered earlier in Accounts. I just clicked on my developer ID and that seemed to fix the problem.
In my case I needed to remove the Team ID from the bundle identifier in targets settings > General.
If you have the Team selected below this id will be added automatically.