Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

iOS Xcode 7.3.1 Associated Domains not enabled #74

Closed
ghybs opened this issue Jul 26, 2016 · 6 comments
Closed

iOS Xcode 7.3.1 Associated Domains not enabled #74

ghybs opened this issue Jul 26, 2016 · 6 comments

Comments

@ghybs
Copy link
Contributor

ghybs commented Jul 26, 2016

Thank you again for the great plugin!

Unfortunately when I build my Cordova project, the generated Xcode project does not have the "Associated Domains" capability enabled. I have Xcode 7.3.1.
Of course I can get the functionality working by enabling it manually and filling the Domains list (as described in issue #8).

Now it would be much preferable that it gets enabled and filled with domains automatically (as the plugin is supposed to do, I guess?), so that other developers do not need to perform the manual process again everytime the Cordova project is rebuilt from source.

It looks like project.pbxproj file needs a new (?) project attribute (in PBXProject section), under project object / attributes:

TargetAttributes = {
    [targetIdentifier] = {
        DevelopmentTeam = [ios-team-id];
        SystemCapabilities = {
            com.apple.SafariKeychain = {
                enabled = 1;
            };
        };
    };
};

Please am I the only one having this bug?

@nikDemyankov
Copy link
Member

Hi,

Can you share your setup in config.xml? Plugin should generate domains list file and activate Associated Domains preference in the project.

@ghybs
Copy link
Contributor Author

ghybs commented Jul 26, 2016

In config.xml (Cordova project root) I have:

<universal-links>
    <ios-team-id value="[ios-team-id]" />
    <host name="[domain]" scheme="https">
        <path url="/path/*" />
    </host>
</universal-links>

Should I have something else specific to enable Associated Domains?

@ghybs
Copy link
Contributor Author

ghybs commented Jul 26, 2016

I realize I have not tested yet on a plain Cordova project. I will perform further tests... Sorry to bother you.

@nikDemyankov
Copy link
Member

In config.xml (Cordova project root) I have:

I realize I have not tested yet on a plain Cordova project.

How did you test it?) Anyway, try to do the following:

  1. Create new project with plugin in it:

    cordova create Test
    cd Test
    cordova platform add ios
    cordova plugin add cordova-universal-links-plugin
  2. Setup config.xml:

    <universal-links>
      <ios-team-id value="test" />
      <host name="test.com" scheme="https">
          <path url="/path/*" />
      </host>
    </universal-links>
  3. Build project:

    cordova build ios
  4. Go to platforms/ios/ and open .xcodeproj file in Xcode. And check, that entitlements file exist, and Associated Domains is activated.

This is how I've tested it.

Also, check, that you have node of version 4+.

@ghybs
Copy link
Contributor Author

ghybs commented Jul 27, 2016

Thank you a lot for the detailed steps!
I meant I tested on my fully loaded project, but I forgot to try on an empty one. :-S

Anyway, it looks like you are right, it seems related to node version.
But I have troubles reproducing exactly my behaviour on an empty project.

BTW, I should mention I initially tested it using Meteor 1.3, which still uses node 0.10 (I had to find a workaround for child_process.spawnSync() from beforePluginInstallHook.js).
Hopefully Meteor 1.4 will upgrade to node 4, but I am unsure when my host will upgrade to Meteor 1.4…

Therefore I will close this issue until I can find out exactly what causes the Associated Domains not being enabled in that configuration.

Maybe I will get node 4 in the mean time? :-)
Thank you again for the above help!

@ghybs ghybs closed this as completed Jul 27, 2016
@nikDemyankov
Copy link
Member

You're welcome :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants