I'm working on an Ionic 3 project and just now getting around to setting up and testing notifications. I don't have prior native iOS development experience, so I've been following a few guides on how to get all the proper certificates, provisioning profiles, and other setup done correctly.
I have an Apple Developer account which I've added to Xcode and have so far been letting Xcode (version 8.3.3) handle signing automatically.
I'm implementing notifications as part of Mixpanel integration, so I've been following this guide: https://mixpanel.com/help/reference/ios-push-notifications. This guide is pretty complete- it walks the user through creating an app ID, adding push, creating & signing the required certs, creating a provisioning profile, and finally uploading those to Mixpanel. The entire process went fine.
When I connected my device in order to try and test push notifications, I started having issues building- I hadn't added the push notification Capability in Xcode, so I did that- however, when I did so, I started getting an error in the code signing config that my provsioning profile didn't include that capability. Weird, because in the details of my App ID on the Apple Developer site, I see that push notifications are enabled for development.
Upon closer inspection, I think the issue is that my App ID bundle identifier (on the Apple Dev site) and the bundle identifier in Xcode don't match. My App ID bundle identifier is:
<team_ID>.com.<domain>.app
com.<domain>.app
<team_ID>
com.<domain>.app
Apple Mach-O Linker (ID) error
The provided answers and comments had good information, however, the only thing that worked for me was creating a new App ID that didn't conflict with the bundle identifier I had set in Xcode. I think the inclusion of my team prefix in my first App ID name played a large part in this usse, as I haven't seen that weird behavior since creating a new App ID with a normal bundle identifier.