我在我们的应用中使用了分支SDK,在我们的网站页面中,我们有一个智能横幅,可以将用户重定向到苹果商店和谷歌播放下载我们的应用。智能横幅在Android/Chrome
和IOS/Safari
中正常运行,但在Chrome/IOS
中,当用户点击按钮下载时,它不会重定向到苹果商店。
我们在此实现中使用了此脚本:https://dev.branch.io/features/smart-banner/guide/
我们已经按照教程中的要求更改了Branch_Key。
<script type="text/javascript">
(function(b,r,a,n,c,h,_,s,d,k){if(!b[n]||!b[n]._q){for(;s<_.length;)c(h,_[s++]);d=r.createElement(a);d.async=1;d.src="https://cdn.branch.io/branch-latest.min.js";k=r.getElementsByTagName(a)[0];k.parentNode.insertBefore(d,k);b[n]=h}})(window,document,"script","branch",function(b,r){b[r]=function(){b._q.push([r,arguments])}},{_q:[],_v:1},"addListener applyCode banner closeBanner creditHistory credits data deepview deepviewCta first getCode init link logout redeem referrals removeListener sendSMS setIdentity track validateCode".split(" "), 0);
branch.init('key_live_XXXXXXXXXXXXXXXXXXXXXXXXXXX', null, null, {referring_link: 'https://bnc.lt/XXXXXXXXXXXXXXX'});
branch.banner({
icon: 'https://s3-sa-east-1.amazonaws.com/ajinomoto-app/icon-promo-ajinomoto.jpg',
title: 'Baixe o aplicativo',
description: 'Cadastre-se e participe em 2 passos',
downloadAppButtonText: 'Baixar',
open_app: true,
showWindowsPhone: false,
showKindle: false,
showDesktop: false,
make_new_link: true}, {});
</script>