In your XCODE project find the Capabilities Tab then scroll down a bit to where it says Push notifications. It is very likely this is now in red and allows you to fix. Basically pressing the "Fix Issues" button will fix this, and that's all.
If Have Fiddled With It Too Much and You Do Not see the Fix Issue ButtonWe were down so many wrong routes, that we did quite a number of bad things to the project files.
I will new provide some recovery information to get the Fix button back.
Check to make sure that
Next check in
Using the editing feature of XCODE locate CODE_SIGN_ENTITLEMENTS in above file which should point to the .entitlements file. If you delete the whole line, you can get back the "Fix Issue" button under the Capabilities tab. Press that fix button again then you can Archive then Push to the iTunes connect.
The following Source Tree GIT Diffs shows you the types of files and file modifications XCODE makes after you press the Fix Issues button.