1

In a situation where a user has our mobile application installed on iOS, but uses our website via Safari browser. User navigates normally through the web pages, however...

Going through checkout/purchase process, we use an externally hosted card payment service, which after card input, redirects the user to the card-issuer's 3DS authentication service, then on completion, the user is redirected back to a page on our site.

(~/cart.php?target=Payment_return)

In this situation, Universal linking is stepping in and causing the redirect link to open our installed app, rather than continuing in the web browser. [this doesnt happen on android devices] This is causing payment processing to complete, but user is lost in the checkout process.

our AASA association file contains:

 "paths": ["NOT *target=product_search*","NOT /cart.php?target=payment_return*","*"]

but this exclusion does not seem to be honoured.

The team is stumped, and would appreciate any advice here.

Clearly this is related to the user's own preference as to the way he last opened a link to either our website or app, and iOS 'remembering' that selection as the default; (the situation doesnt occur if the users last choice was to open our links in the browser); nonetheless the redirection while working IN the browser is unwelcome, and that the AASA exclusion doesnt seem to be working.

We've missed something here? or there must be a lot of others in this same boat, surely? help.

tia.

Geoff
  • 13
  • 4
  • Can you update your post with current AASA, please redact any info if needed. – n3dx Jun 17 '21 at 14:12
  • @n3dx Mine was essentially the same as demonstrated in apple docs [here]:https://developer.apple.com/library/archive/documentation/General/Conceptual/AppSearch/UniversalLinks.html I wasnt aware of the extended AASA format in the link provided by Burak, below. – Geoff Jun 19 '21 at 06:55
  • Hi @Geoff - we actually have the opposite problem, which is that we would like the iOS app to open via Universal Link after a redirect from an external authentication provider. However, it's just not triggering and we thought this was because it's not possible to open the app via a Universal Link if it's originating from a redirect? Are you saying this does happen and is possible on iOS? Any documentation around this particular topic that you've found? We're stumped. – Kyle Whittington Jan 17 '22 at 19:55

1 Answers1

0

From the docs, refer here:

Note that only the path component of the URL is used for comparison. Other components, such as the query string or fragment identifier, are ignored.

That's probably why exclusions are not honored.

I don't know if you need to support below iOS 13, but if you are targeting iOS 13 and upper versions, there is still hope, check here for detailed documentation.

In your case, it can be something like (I didn't try it, just to give you an idea):

{ "applinks": {
  "details": [
       {
         "appIDs": [...],
         "components": [
           {
              "/": "/cart.php*",
              "?": { "target": "payment_return" },
              "exclude": true,
              "comment": "Matches any URL whose path starts with cart.php and which has a query item with name 'target' and a value payment_return"
           }
         ]
       }
   ]}, ...}

And do not forget reinstalling the app after changing AASA on the website.

Burak Akkaş
  • 486
  • 3
  • 8
  • Thank you. That explains why the exclusions were ignored. I expect with the changes suggested this will resove this. Will update after testing. ty. – Geoff Jun 19 '21 at 06:47
  • No problem, glad to help, @Geoff. Could you mark this as an answer? – Burak Akkaş Jun 24 '21 at 08:04
  • We ultimately resolved this with your help/direction @Burak Thanks. AASA now contains exclusions like: ` "/": "/cart.php*", "?": { "target": "payment_return" }, "exclude": true, "?": { "target": "payment_return" }, "exclude": true, "#": "no_universal_links", "exclude": true,` (Unfortunately now, it seems, an update to Chrome on Android seems to be causing similar issues with the redirect, and I'm searching for a solution for Android apps \\_0_/ ) – Geoff Feb 18 '22 at 06:54