gpt4 book ai didi

ios - 从 URL 模式打开应用程序

转载 作者:行者123 更新时间:2023-11-29 01:17:13 24 4
gpt4 key购买 nike

这听起来可能很疯狂,但只是想知道深层链接/URL 架构如何到达应用程序以在设备中打开它。搜索了一篇文章,但都包含如何使它在技术上工作,我完全体验过,但找不到握手的工作原理。

如果有人知道可以分享,非常感谢!

谢谢。

最佳答案

到目前为止,我能找到的关于该主题的最佳信息是 Wikipedia :

Unlike the Web, where the underlying technology of HTTP and URLs allow for deep linking by default, enabling deep linking on mobile apps requires these apps be configured to properly handle a uniform resource identifier (URI). Just like a URL is an address for a website, a URI is the address for an app on a mobile device. Examples of URIs that launch a mobile app:

twitter:// is the iOS URI to launch Twitter’s mobile app

YouTube:// is the iOS URI to launch YouTube’s mobile app

The format of the URI used to trigger or deep link an app is often different depending on the mobile operating system. Android devices work through intents, BlackBerry 10 devices works through BB10's invocation framework, Firefox OS devices works through Web Activities, iOS devices works through the openUrl application method, and Windows Phone 8 devices works through the UriMapper class.

fb://profile/33138223345 is an example of a mobile deep link. The URI contains all the information needed to launch directly into a particular location within an app, in this case the profile with id '33138223345', i.e. the Wikipedia page, within the Facebook app, instead of simply launching the Facebook app fb://. eBay's apps demonstrate the use of different schemes by platform. eBay://launch?itm=360703170135 is the URI that deep links into eBay’s iOS app while eBay://item/view?id=360703170135 links into eBay’s Android app

基本上,URL 匹配从操作系统级别开始。iOS 将使用你的应用程序 plist 文件中的设置来处理应用程序之外的一大堆其他事情。其中之一是深层链接。

您在 plist 中声明您的 URL 方案,每当操作系统遇到与该方案匹配的 URL(通常是当用户点击按钮或链接时),它就会打开您的应用程序并传递 URL 信息。然后由您负责决定如何处理这些信息。

它会跳转到个人资料页面吗?特定产品?这一切都由您决定。

关于ios - 从 URL 模式打开应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35026013/

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