简体   繁体   English

iOS自定义URL方案 - 获取源URL

[英]iOS Custom URL Scheme - get source URL

I'm working on an app which launches from a custom url scheme. 我正在开发一个从自定义网址方案启动的应用程序。

I've managed to get the url and its parameters and everything, however, our app launches a web view. 我已经设法获取网址及其参数和所有内容,但是,我们的应用程序启动了一个Web视图。 we want that when the user clicks a link with this scheme, the same page he is on would open up in our web view (it's needed because other functions run in the background, and allowing the user to keep browsing the website he was on) 我们希望当用户点击具有此方案的链接时,他所在的同一页面将在我们的Web视图中打开(这是必需的,因为其他功能在后台运行,并允许用户继续浏览他所在的网站)

Is it even possible to get the location of the clicked url? 甚至可以获得点击网址的位置? I know I can get the source application, but is there any way (other than adding the link to the scheme itself as parameters) to get the source link? 我知道我可以获得源应用程序,但有没有办法(除了添加方案本身的链接作为参数)来获取源链接​​?

Thanks! 谢谢!

If you need information passed in to your application, that information must be somehow represented by in URL itself. 如果您需要传递给应用程序的信息,则必须以URL本身的形式表示该信息。

Adding a generic interface for that purpose wouldn't make sense as those URLs could be hosted inside an email message or an SMS, for example. 例如,为此目的添加通用接口是没有意义的,因为这些URL可以托管在电子邮件消息或SMS中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM