I have 2 different schemes, pointing to two different bundle identifiers.
com.myapp.appname
com.myapp.appname.Debug
Each point to 2 different provisioning profiles.
Whenever I do a run on the scheme with the debug bundle id - I get an error saying my provisioning profiles bundle id (com.myapp.appname.Debug) does not match my apps bundle id (com.myapp.appname) - even though the bundle id that I'm currently building with is actually com.myapp.appname.Debug
To test further, I changed it to use the provisioning profile for com.myapp.appname
The build succeeded without error, but wouldn't install on the device because it was signing with invalid entitlements. Because the bundle ID of the app is actually com.myapp.appname.Debug
Any thoughts on why it is looking for the wrong bundle identifier during the code signing process?
Ah. Seems to be caused by this same issue
https://forums.developer.apple.com/message/136160#136160
Changing bundle identifier in info.plist did not change it under packaging in build settings, Manually changing the Product Bundle Identifier under packaging to ${CustomAppBundleId} fixed my issue.