dkhaupt dkhaupt - 2 years ago 122
iOS Question

App ID & bundle identifier: provisioning profile issues

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: 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:


But my bundle identifier in Xcode is:


At the time I created the App ID, I thought the
prefix was required for the bundle identifier in the App ID setup- but I don't think that's right. I see the prefix separately in the App ID info:

App ID info

Was this the wrong thing to do? The reason I got confused and added the team ID to my App ID bundle identifier was because my bundle identifier from Xcode (
) wasn't allowed. The error I got when trying to use it while creating an App ID:

error creating app id

To be clear- I have no other App IDs in the Apple Developer profile with this bundle identifier.

I know this identifier should be available because I've been using it in Xcode before today, with the same signing identity. Why wouldn't I be allowed to use it to create an App ID- isn't the point that the bundle ID must be the same both in that and in Xcode?

The final confusing point here (to me) is that I decided to change the bundle identifier in Xcode to match that of my App ID (to confirm that, once they matched, building would work). After I did that, Xcode seemed to accept the new bundle identifier, but I get different build errors- and if I change my signing identity, the errors that show up in the signing config don't make sense- they reference a bundle identifier that isn't the one just above in Xcode:

weird config error

Specifically, why does the bundle identifier in the error not match what's set in the config at the top of the image? I've tried restarting Xcode and this still happens. At this point, I can't even build with Xcode if I remove the push capability- I get a mysterious
Apple Mach-O Linker (ID) error
which doesn't turn up much when googling.

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download