【发布时间】:2017-09-21 12:12:11
【问题描述】:
我正在尝试制作一个基本的旅程应用横幅。没有深度链接(在这个阶段),只是一个基本的横幅,当用户访问我们的网站时,他可以获取我们的 iOS 应用程序,或者如果它已经安装则启动它。 问题是横幅总是显示“进入应用商店”选项,即使该应用已经安装在设备上。
我在没有任何帮助的情况下查看了Branch.io: javascript detect whether mobile app is installed 和其他类似问题。
我已经运行了通用链接验证器和 ulv_script.sh,它没有显示任何问题。
在我做的网页中:
branch.init('My_key_live_xxx', null, function(err, data) {
console.log('init...');
console.dir(data);
});
调试时数据属性如下:
{data: "", data_parsed: {}, has_app: null, identity: null, referring_identity: null, …}
在 ios-app 的 AppDelegate 中,我什么都不做:
let branch: Branch = Branch.getInstance()
branch.initSession(launchOptions: launchOptions, andRegisterDeepLinkHandler: {params, error in
if error == nil {
// params are the deep linked params associated with the link that the user clicked -> was re-directed to this app
// params will be empty if no data found
// ... insert custom logic here ...
print("params: %@", params as? [String: AnyObject] ?? {})
}
})
在我真正想要链接到应用程序中的特定位置之前,我认为这里不需要特殊代码。现在我只想打开应用程序(或者实际上只是被检测到,因为打开按钮需要检测才能显示......)
始终指向应用商店的半功能版本已上线,以防有人想提前查看问题:https://www.papereed.com/player
我想我错过了有关 branch.io 的一些真正基本的东西,希望有人能提供帮助。 谢谢!
【问题讨论】:
标签: javascript ios iphone branch.io