Ios – The app ID cannot be registered to your development team

code-signingiosxcode

I am trying to deploy an iOS app to a test device with Xcode 9.1. but I get the following error:

The app ID "com.myDomain.myApp" cannot be registered to your development team. Change your bundle identifier to a unique string to try again.

I have 2 Apple IDs registered in Xcode and I made the mistake of choosing "Automatically manage signing" with the wrong development team, the one associated to the wrong Apple Id. Now I want to change it but I don't know how.

This is what the signing section of the target looks like for the development team I chose by mistake:

enter image description here

This is what the signing section of the target looks like for the development team I would like to use instead:

enter image description here

I have gone to the Apple Developer portal and couldn't find the app under App IDs, so I don't know how I can remove it to start from scratch. I have removed the signing certificate from the local keychain but that is not enough.

Note that I still would like to use "Automatically manage signing" and I would still like to keep the bundle identifier.

Best Answer

I had to reuse the Bundle Identifier, because we were replacing an old app. I spent three hours trying everything I could find on the internet.

In the end I changed the bundle identifier, pressed all the buttons, then changed it back to the original bundle identifier and everything worked.

This is not the first time that I spent hours wasting in Xcode/ iOS Dev while in the end I just needed to do some voodoo ritual.