An attribute in the provided entity has invalid value An App ID with Identifier 'com.company.appname' is not available. Please enter a different string.

Hi all,
I want to create new Identifier in apple developer account but every time I get warning: An attribute in the provided entity has invalid value etc...

I created application in XCode a let XCode automatically assigned by my provisioning profile and add unique bundle id and I let install the app on simulator.

Now I want to set Push Notifications to app. So I have to create new Identifier for the app.
If I set Bundle ID in Apple developer Account under Certificates, Identifiers & Profiles > + > AppIDs > App > set description and Bundle ID (Explicit) AND tick checkbox Push Notifications > click to Continue button and finally if I click to Register button Warning appear

An attribute in the provided entity has invalid value An App ID with Identifier 'com.company.appname' is not available. Please enter a different string.

I am pretty sure that Bundle ID is unique because I use it in my app in XCode so why If the bundle Id is registered under my provisioning profile why I can't use same bundle Id for register in Identifiers?

Maybe it is somehow related with Certificates in Keychain Access?

Could somebody help me please?

Have nice a day Petr.




I found out in XCode if I don't use capability Push Notification it is ok But if I add Capability Push Notification in XCode appear me three warning: 1) Failed to register bundle identifier The app identifier "com.company.app" cannot be registered to your development team because it is not available. Change your bundle identifier to a unique string to try again. 2) Provisioning profile "iOS Team Provisioning Profile: *" doesn't support the Push Notifications capability. 3) Provisioning profile "iOS Team Provisioning Profile: *" doesn't include the aps-environment entitlement. 

there are images: https://stackoverflow.com/a/66672487/6130088
An attribute in the provided entity has invalid value An App ID with Identifier 'com.company.appname' is not available. Please enter a different string.
 
 
Q