18 Replies Latest reply on Jun 19, 2017 7:33 AM by mkih40437034

    Wrong value for `com.apple.developer.associated-domains`

    matt_corkscrew

      I am trying to build my app on PGB using the cordova-universal-links plugin. It is well-known that this plugin doesn't work on PGB since it uses Cordova hooks to set the necessary hyperlinks for universal linking.

      However, as of cordova-ios 4.3.0 it is possible to set the entitlements using plugin.xml, so we figured we could fork the universal links plugin for use on PGB. We added the following to the plugin.xml:

          <config-file target="*-Debug.plist" parent="com.apple.developer.associated-domains">
            <array>
              <string>applinks:example.com</string>
            </array>
          </config-file>
          <config-file target="*-Release.plist" parent="com.apple.developer.associated-domains">
            <array>
              <string>applinks:example</string>
            </array>
          </config-file>

      This works beautifully in my local build, but when I try it on PGB I get the following entitlement:

           <key>com.apple.developer.associated-domains</key>
           <string>*</string>

      Instead of an array, the key is set to a string containing an asterisk!

      I spent an inordinate amount of time playing around with the config to try to figure out what's going on, but the only thing I established is that this entitlement is emitted even if I remove the universal links plugin, as long as the provisioning profile has Associated Domains enabled.

      My working theory is that PGB is setting this entitlement based on the provisioning profile and it is overwriting the setting from the universal links plugin. Is this possible? If so, is this a bug or am I misunderstanding something about the way thing should work?