I should mention that the automatic provisioning isn't working for me -- not sure why not -- so I'm creating the profiles manually.
There are really two different questions in here, one related to building your app and the other related to submitting your app.
With regard to building your app, I would strongly encourage you to figure out why Xcode's automatic provisioning isn't working. That's by far the easiest way to deal with building your app. Doulbe check that your account password is entered correctly in the Accounts preferences panel in Xcode, that you have the team selected in both the app and extension targets in the project settings, and that you haven't manually set any of the codesigning or provisioning settings on the Build Settings tab (Xcode should tell you if you have). Both the parent app and the extension have to be code signed. You will need provisioning profiles for both the parent app (the shell one) and the extension itself. Again, the easiest way to manage this is to have both the app and extension set to use automatic provisioning. Also note, that the extension's bundle identifier should be prefixed by the parent app's bundle identifier.
With regard to submitting your app, iTunes Connect only cares about the parent app, because that's what is actually being submitted. So you would create an app record in iTunes Connect for that parent app (using its bundle identifier). There is more detail about submitting your iMessage app here https://developer.apple.com/app-store/imessage-app-submissions/.
Thanks kindly, pdm. Your iTunes Connect info is exactly what I needed to know.
Regarding the automatic provisioning, I'd prefer to use it. Your suggestions to get that to work are helpful but I'm still not seeing any auto-created profiles in my developer account and get a "failed to create a provisioning profile" error in xcode. I've checked the things you mentioned but I must not be checking correctly. The extension's bundle identifier looks fine, so it must be one of the other things you mentioned. Could you please point me to or provide screenshots of what these items should look like:
- "View Details" on Preferences>Account>AppleID (that is, I'm logged in fine but maybe those details show something is amiss?)
- Selecting Team in Project Setting of app and extension
- Where exactly in the Build settings to check for manual codesigning and provisioning?