nordnet / cordova-universal-links-plugin

[DEPRECATED] - Cordova plugin to support Universal/Deep Links for iOS/Android.
https://github.com/nordnet/cordova-universal-links-plugin/issues/160
MIT License
349 stars 526 forks source link

Refactored plugin hooks for newer XCode cli builds and codova >7 #129

Closed mark-veenstra closed 5 years ago

mark-veenstra commented 6 years ago

Refactored the plugin hooks to be compatible with pre cordova 7 and post cordova 7. Also made sure the new entitlements style of XCode is respected, so building from command line works.

This PR solves:

I did some tests on Android and iOS and all seems to work. I did not test any path specific links, but they should work also.

My config.xml looks like this:

<widget>
  <universal-links>
    <host name="myapp.mydomain.org" scheme="https"/>
  </universal-links>
</widget>

On the domain https://myapp.mydomain.org I have a file apple-app-site-association, filled as follows:

{
    "applinks": {
        "apps": [],
        "details": [
            {
                "appID": "<MYTEAMID>.<MYAPPID>",
                "paths": [
                    "*",
                    "/"
                ]
            }
        ]
    }
}

Also I have a build.json that covers my builds, like:

{
    "android": {
        "debug": {
            "keystore": "config/android.keystore",
            "storePassword": "<pass>",
            "alias": "debug",
            "password" : "<pass>",
            "keystoreType": ""
        },
        "release": {
            "keystore": "config/android.keystore",
            "storePassword": "<pass>",
            "alias": "release",
            "password" : "<pass>",
            "keystoreType": ""
        }
    },
    "ios": {
        "debug": {
            "codeSignIdentity": "iPhone Developer",
            "developmentTeam": "<MYTEAMID>",
            "packageType": "development",
            "buildFlag": [
                "EMBEDDED_CONTENT_CONTAINS_SWIFT = YES",
                "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO",
                "LD_RUNPATH_SEARCH_PATHS = \"@executable_path/Frameworks\""
            ],
            "iCloudContainerEnvironment": "Development"
        },
        "release": {
            "codeSignIdentity": "iPhone Distribution",
            "developmentTeam": "<MYTEAMID>",
            "packageType": "app-store",
            "buildFlag": [
                "EMBEDDED_CONTENT_CONTAINS_SWIFT = YES",
                "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO",
                "LD_RUNPATH_SEARCH_PATHS = \"@executable_path/Frameworks\""
            ],
            "iCloudContainerEnvironment": "Production"
        }
    }
}

Now when I build from the command line all works like a charm.

menelike commented 6 years ago

This crashes with

Note: https://github.com/nordnet/cordova-universal-links-plugin/pull/114 works fine

nordnet-deprecation-bot commented 5 years ago

👋 Hi! Thank you for your interest in this repo.

😢 We are not using nordnet/cordova-universal-links-plugin anymore, and we lack the manpower and the experience needed to maintain it. We are aware of the inconveniece that this may cause you. Feel free to use it as is, or create your own fork.

🔒 This will now be closed & locked.

ℹ️ Please see #160 for more information.