Smart App Banner Meta Tag not being honored

I have followed implementation directions at this page: https://developer.apple.com/documentation/webkit/promoting_apps_with_smart_app_banners

My goal is to only have the banner show on certain pages of our website. Our website is a SPA and we add or remove the meta tag as the website visits different routes.

The issue I am observing is that the banner will show on initial site view. However, if you navigate to a page where we remove the banner meta tag (it is no longer in the DOM) - Safari is still showing the banner. A manual refresh in Safari reloads the page and the banner no longer shows.

Additionally, if I am at a page where the meta tag does not exist, and then navigate to a page where we add the meta tag, Safari does not show the banner. A manual refresh of the page again fixes the problem and the banner is shown.

So it appears to me that Safari is not detecting that the meta banner has been removed or added on certain pages.

One last interesting note: I have also tested this exact process with the meta tag to change the navigation color. In my testing, Safari is CORRECTLY adding or removing the navigation color on the correct pages that I have added or removed the color meta tag.

So it works correctly for the nav colors. However, it is not working for the Smart App Banner. Both features only require the meta tags.

Can anyone give me insights into how I can fix the bug with the Smart App Banner meta tag not being honored by Safari?

I'm having the same issue. app-argument is always set to the initial URL provided in the first HTML painted by Safari, which in my case is generated server side. I've tried updating it in a useEffect and after navigation, but its always using the initial URL provided to app-agrument.

It also doesn't display the app banner if I include the meta tag in a component that is dynamically important with server side rendering set to false. That's how I've been able to deduce that Safari seems to only be checking the initial HTML painted by Safari and doesn't re-check after navigation as well.

Did you ever find a solution?

Smart App Banner Meta Tag not being honored
 
 
Q