How to hide native safari smart banner?
Has anyone had any success with hiding the native, safari smart banner? Safari has great docs https://developer.apple.com/documentation/webkit/promoting-apps-with-smart-app-banners on how to show and customize it. But no where in their docs do they show how to hide it completely in case a site doesn't want to show the smart banner.
I know there's https://github.com/ain/smartbanner.js but i don't want to customize it. I also don't know how this smartbanner behaves on safari. Maybe it will show the custom one it enables + the native safari smart banner 🤷
Apple Developer Documentation
Promoting Apps with Smart App Banners | Apple Developer Documentation
Create a banner to promote your app on the App Store from a website.
GitHub
GitHub - ain/smartbanner.js: Customisable smart app banner for iOS ...
Customisable smart app banner for iOS and Android. Contribute to ain/smartbanner.js development by creating an account on GitHub.
3 Replies
This SO post suggests it's not possible https://stackoverflow.com/a/49434236/2524631 "Since the AASA file is installed on the device, Safari will automatically associate that web page with an app and therefore load the banner in the browser. "
Stack Overflow
How can I disable the "open in app" banner on ios safari for pages ...
After registering a path as a universal link via apple-app-site-association, I'm seeing that on pageloads on iOS safari, when I have the app installed, the system will inject an "open in app" banne...
Customize it with display none ðŸ¤
no the native safari smart banner is not selectable with JS or CSS
the solution was to update the Asaa files which define what links are "deep linkable" -- remove the urls from the Asaa files, delete the app on the device, refresh safari and see no banner. Then install the app on your device, refresh safari and still see no banner