通用链接不在开发中 [英] Universal links not working in development

查看:135
本文介绍了通用链接不在开发中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为我的应用创建通用链接。我正在使用Apple验证工具来测试我的服务器配置(



所以我运行的应用程序包含:

   - (BOOL)应用程序:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void(^)(NSArray * _Nullable))restorationHandler 

方法已实施,但我的应用从未打开过。我只能看到Safari。权利也被添加到XCode。有趣的是,在智能应用程序横幅上,我从来没有打开这个词,但是我得到了视图按钮,以便我可以从应用程序商店下载它。我做错了什么或者我的应用程序是否必须上传到appstore才能通过它打开链接?

解决方案

我的问题是,在 Appstore 版本中,我点击了右上角一次以转发到Safari页面。即使通过卸载和应用程序的新安装,也会保存此行为。
dev 版本中,我从未点击过右上角,因此通用链接始终有效。



如何修复:
例如,转到备注并创建一个链接 https://example.com/whatever 现在长按此链接并选择在< App Name>中打开


I am trying to create Universal links for my app. I am using the apple validation tool to test my server configuration (https://search.developer.apple.com/appsearch-validation-tool/) and everything looks fine.

So I run my app which has the:

- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray * _Nullable))restorationHandler

method implemented but my app never opens. I can only see Safari. Entitlements are also added to XCode. The funny thing is that on the smart app banner I never get the word open but I get the view button so that I can download it form the app store. Am I doing something wrong or must my app be uploaded to the appstore so that the links can be opened by it?

解决方案

For me the problem was that in the Appstore version I clicked once on the top right to get forwarded to the Safari page. This behaviour was saved even through uninstall and new installations of the app. In the dev version I never clicked on the top right corner and therefore universal linking worked all the time.

How to fix it: For example go to notes and create a link https://example.com/whatever now long press on this link and select Open in "<App Name>"

这篇关于通用链接不在开发中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆