gpt4 book ai didi

ios - 如果用户没有应用程序,如何实现 DeepLinking?

转载 作者:行者123 更新时间:2023-11-30 12:11:02 31 4
gpt4 key购买 nike

我的项目对 DeepLinking 或通用链接有 3 个要求。

  1. 如果用户正在使用该应用程序,则 URL 应重定向到包含内容的应用程序。
  2. 如果用户没有该应用程序,则应重定向到应用商店。
  3. 如果用户没有该应用程序,那么它应该重定向到 Appstore,下载应用程序后,它应该转到包含我通过 URL 发送的数据的页面。

我关注的链接:

  1. https://www.raywenderlich.com/128948/universal-links-make-connection
  2. https://developer.apple.com/library/content/documentation/General/Conceptual/AppSearch/UniversalLinks.html
  3. http://swiftdeveloperblog.com/deep-linking-using-custom-url-scheme/
  4. http://blogs.innovationm.com/deferred-deep-linking-in-ios-with-universal-link/
  5. https://developer.apple.com/documentation/security/shared_web_credentials/preparing_your_app_and_website_to_share
  6. http://www.brianjcoleman.com/tutorial-deep-linking-in-swift/

我的理解是:

Creating and Uploading the Association File and for this I have to follow some steps:

Adding support for universal links is easy. There are three steps you need to take:

Create an apple-app-site-association file that contains JSON data about the URLs that your app can handle. Upload the apple-app-site-association file to your HTTPS web server. You can place the file at the root of your server or in the .well-known subdirectory. Prepare your app to handle universal links.

Creating and Uploading the Association File

To create a secure connection between your website and your app, you establish a trust relationship between them. You establish this relationship in two parts:

An apple-app-site-association file that you add to your website A com.apple.developer.associated-domains entitlement that you add to your app

Preparing Your App to Handle Universal Links.
In your com.apple.developer.associated-domains entitlement, include a list of the domains that your app wants to handle as universal links. To do this in Xcode, open the Associated Domains section in the Capabilities tab and add an entry for each domain that your app supports, prefixed with applinks:, such as applinks:www.mywebsite.com.

问题是:我按照所有步骤操作,并且有一个 URL,我将其添加到关联域的域中。

示例:https://<My_Domain>/anything 。现在后端正在生成 URL 并发送。

我们正在使用Http服务器。

示例:

Route::get('appstore',function(){ return redirect()->away('https://itunes.apple.com/in/app/whatsapp-messenger/id310633997?mt=8');}); 

问题是,当我点击该 URL 时,我没有收到任何已有应用程序的弹出窗口,而且下载后我将如何获取数据?

缺少某些内容或后端缺少某些内容?

最佳答案

因此,您似乎正在尝试实现延迟深度链接,这意味着如果安装了应用程序,则将用户路由到内容,或者将用户路由到应用程序商店以下载应用程序并在应用程序打开后向他们展示内容。这对你自己来说是非常困难的,我稍后会解释更多。

看起来您正确设置了通用链接,但到应用程序商店的重定向相当棘手。通用链接旨在用于将用户重定向到网络版本,这意味着将他们带到应用商店并不是一件容易的任务。

如果您确实让用户访问应用程序商店,则延迟深度链接只是在他们安装应用程序后将他们定向到内容是 nearly impossible自己做,而不使用像 Branch 这样的第三方服务。 Branch 还允许您将用户推送回应用商店下载应用(如果这是您想要的用户体验)。

希望这有帮助!

关于ios - 如果用户没有应用程序,如何实现 DeepLinking?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46055847/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com