I have an existing app with the App ID. I am trying to turn on push notification for it. However, it says "An App ID with Identifier is not available.". I tried deleting all certificates and all profiles and starting all over. But I could not get it to work!
If I manually setting Code Sign Identity it says "No codesigning identities (i.e. certificate and private key pairs) that match your provision profile specified in your built setting were found. If I let it auto-fix it goes back to saying the App ID is not available again.
I was dealing with the same for two days, then I found that in order for XCode to find the App Id, it is not enough for the Id to match, but also the App name has to be in a specific format (which I'm sure I didnt't have before, and it used to work).
Go to your Apple Developer "Certificates, Ids, Profiles", and under your App IDs list find the App ID in question and,
If your App ID is in the form: com.myDomain.MyApp
Then the name in your App ID record has to be: "XC com myDomain MyApp"
Don't ask me why, but it works. (is the default name that XCode assigns when you create the record from XCode), but for records that exist prior or that you created directly in the Developer site, the name should be whatever you want... but its not. Some glitch introduced in one of the latest XCode releases.