Trying to really get an understanding of code-signing and provisioning profiles. What provisioning profile is XCode using when you opt for Automatic? Your ad hoc profile?
Xcode creates a separate provisioning profile that it uses. It will not use a profile that was created manually.
If you add entitlements to your app, Xcode will also add those to the automatically managed provisioning profile.