Ran into this issue w/ my team once we implemented a SharedExtension for our main app. As stated above, everything seemed to check out when we would verify permissions/entitlements via Xcode and the dev portal. Our solution was to add any missing provisioning profiles to the ExportOptions.plist (in our case the missing prov profile we added to the SharedExtensionApp) as stated in our build error:
Error Domain=IDEProvisioningErrorDomain Code=9 ""SharedApp.appex" requires a provisioning profile with the App Groups feature." UserInfo={IDEDistributionIssueSeverity=3, NSLocalizedDescription="SharedApp.appex" requires a provisioning profile with the App Groups feature., NSLocalizedRecoverySuggestion=Add a profile to the "provisioningProfiles" dictionary in your Export Options property list.}
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
Tags: