Hide “Open in app” banner while using Universal li

2019-05-06 18:20发布

问题:

I'm using Universal links and everything is working perfectly but I can't seem to hide the Open in app banner which shows in the safari. Is there any way to do this?

回答1:

There's nothing you can do about that really, it's a feature of Universal Links and gets injected automatically by Safari.

Usually, they're hidden until you overscroll the content.



回答2:

What goal you are trying to achieve by using Universal Links? Usually developers are using Universal Links if they want for all/part of the website to be viewable in the App. From this point of view, screenshot you posted is a failure, because Universal Links failed to engage. Possible reasons can be if navigation to the Universal Links domains happened as redirect.

If there are specific pages on your website that you don't want become viewable in the App, you can use exclusions list in associated domain file. Check out this example http://amazon.com/apple-app-site-association . In this case navigating to the "/ref=nodl_" will not open the Amazon and will not show the banner you are mentioning.



回答3:

Hey you can hide the smart banner by edit your apple-app-association file in the root directory of your website. You can control the banner on the pages you want to show.

you cannot hide the banner while using the universal links at the same time. You can only hide the banner where you do not want the universal links to work by restricting the paths in apple-app-association file.

If you want to hide the banner form all the pages just add "paths":["NOT /*"] in details object in this case universal links will not work.