Add support for wildcard domains introduced in iOS 9.3#56
Add support for wildcard domains introduced in iOS 9.3#56nikDemyankov merged 3 commits intonordnet:masterfrom
Conversation
|
Great, thanks for the PR! |
|
I have just added the necessary changes for Android. Unfortunately Android/Java doesn't seem to offer a simple glob style matching API, so I had to check the host declaration explicitly for |
|
Thanks! Can you also provide examples for android/ios with the wildcard domains in order to update plugin's documentation? |
|
Sure thing: <universal-links>
<host name="*.users.example.com" scheme="https" event="wildcardusers" />
<host name="*.example.com" scheme="https" event="wildcardmatch" />
</universal-links>Please note, that iOS will look for the Android/Google will try to access the app links file at |
|
Great, thanks! |
|
@schmidt just bumped into this post after having read these docs. It looks like Apple looks in the root and in
|
|
ETA on this getting merged? |
|
@FreakTheMighty Your're right. Apple will look for the files at My main intent was to highlight the host names, that are used, and the differences between the ones, that Android and iOS test. |
|
Merged. Thanks to @schmidt ! |
Starting with version 9.3, iOS now supports wildcard domains in universal link declarations (see current version of official documentation). This works out of the box with this plugin, i.e. the proper entitlements are created and the os interaction works as expected. The only problem is that no JS event is triggered, since the plugin code cannot identify the proper event name.
The attached changes update the
findHostByURLmethod to match host names using wildcards.Additionally the changes introduced for #44 are updated to also use the predicate match - this was done to avoid creating a second local var, while predicate matches already support case insensitive matching.
Please note, that Android also supports wildcard subdomains in
intent-filterdeclarations. To make this workUniversalLinksPlugin.findHostByUrlwould need to be updated accordingly.