1 Reply
      Latest reply on May 23, 2019 1:52 PM by nwpeakbagger
      nwpeakbagger Level 1 Level 1 (0 points)

        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

        • Re: Provisioning issues after upgrading to xcode10.1
          nwpeakbagger Level 1 Level 1 (0 points)

          With help from Apple we were able to come up with a solution for the first error:

          Provisioning profile "iOS Team Provisioning Profile: com.ourapp.widget" doesn't match the entitlements file's value for the application-identifier entitlement.

           

          In our xcconfig, we had two keys: one for our main app and one for our extension. ie:

          PRODUCT_BUNDLE_IDENTIFIER=com.ourapp

          WIDGET_BUNDLE_IDENTIFIER=com.ourapp.widget

           

          At compile time, xcode10.1 had an internal collision with our main app target using $(PRODUCT_BUNDLE_IDENTIFIER) as the Product Bundle Identifier build setting.

           

          The fix was to change PRODUCT_BUNDLE_IDENTIFIER to APP_BUNDLE_IDENTIFIER and then change the main app target's build settings to use this new key $(APP_BUNDLE_IDENTIFIER).