We are developing an Add To Wallet flow on our website where we add the "Add To Wallet" button to a user portal for them to be able to add a loyalty card pass to their Apple Wallet.
In other projects with Apple Pay, we can check whether or not the browser supports the JS library by checking if it exists on the global window property (if (window.ApplePaySession) { //do stuff }
Is there an equivalent to determine if the user's device is capable of accepting a Wallet pass?
Post
Replies
Boosts
Views
Activity
We've got a AASA file on our site that has a list of URLs that our App can handle.
These URLs follow a REST standard, but also have resource identifiers in them, for example
/site/:siteId
/site/:siteId/service/:serviceId
Our service IDs are limited to specific numbers, which we've hardcoded in our AASA file so that only specific service URLs will open. Our AASA file looks like the below
{
"applinks":{
"apps":[],
"details":[
{
"appID":"${appIdPrefix}.${bundleIdentifier}",
"paths":[
{
"/":"site/*/service/1/"
},
{
"/":"site/*/"
}
]
}
]
},
"webcredentials":{
"apps":[
"${appIdPrefix}.${bundleIdentifier}"
]
},
"appclips":{
"apps":[
"${appIdPrefix}.${bundleIdentifier}.clip"
]
}
In this example, hitting a URL like /site/1/service/1 works correctly - however, hitting a URL like /site/1/service/999 will also open the app, despite it not being a valid URL.
I'm assuming that the wildcard on site/*/ is causing the invalid URL to match.
How can I set my AASA up so that the site ID can still be any value, but the URL is matched strictly?