Hello! We are really stumped here and thought to reach out and see if this battle has been won before.
Our team has recently updated our project from xcode9.2 to 10.1. Our project is built using xcodebuild command line and is manually signed. The project has two main targets, the main app and an extension (widget).
The first error we encountered after the upgrade is:
Provisioning profile "iOS Team Provisioning Profile: com.ourapp.widget" doesn't match the entitlements file's value for the application-identifier entitlement.
After looking at the provisioning profiles generated from both app id's (main app and widget), indeed we do see an application-identifier key that shows a teamId in front of the bundle id. ie <teamId>.com.ourapp.widget.
Now, we can make this error disappear by modifying each target's info.plist value for Bundle identifier to include the teamId infront of the bundle ids. But, this generates a new Provisioning error stating that each target's provisioning profiles are missing capabilities.
Errors:
error: exportArchive: "OurApp.app" requires a provisioning profile with the Associated Domains and Push Notifications features.
error: exportArchive: "OurApp.appex" requires a provisioning profile with the Associated Domains feature.
However, the provisioning profiles that we have listed in our exportOptions.plist file point to profiles that definitely include all needed capabilities for both targets. Here is our exportOptions.plist:
<dict>
<key>teamID</key>
<string><TeamId></string>
<key>provisioningProfiles</key>
<dict>
<key>com.ourapp</key>
<string><Profile's Name></string>
<key>com.ourapp.widget</key>
<string><Widget profiles UUID></string>
</dict>
<key>method</key>
<string>app-store</string>
<key>uploadSymbols</key>
<true/>
</dict>
So first we ask the question: should we have modified the info.plists to include the teamId in front of the bundle id? ..and if that is ok, then we are perplexed at why exportArchive is not seeing the provisioning profiles we are passing in using the exportOptions.plist.
Final question for the moment: Should the bundle id in the exportOptions.plist also have the teamId?
Any help is greatly appreciated!
-Jason