在ios的safari中共享一个链接到我的应用程序? [英] sharing a link opened in safari in ios to my application?
问题描述
我需要有关此问题的帮助。
我的应用程序中有一项与其他用户共享链接的功能,我需要做的是:
- 打开safari浏览器中的任何链接
- 直接在safari浏览器上执行一些操作,在我的应用程序中共享该链接。
这是否可以在iOS中直接共享从浏览器到应用程序的链接。
需要帮助。
问候。
然后从Targets-> Info我指定了对网址的支持
然后我花时间搜索一种方法来使用原始app文件应用扩展和这篇文章帮助了我很多在原始iOS之间共享代码应用和应用扩展程序
如果您使用的是cocoapods,这对您也有帮助 https://stackoverflow.com/a/31989172/3033056 但请注意,并非所有广告连播都允许在应用扩展程序中使用
这是 http://www.appcoda.com/ios8-教程的链接share-extension-swift /
I need help about this problem.
I have a functionality in my application to share links with other users, what I need to do is:
- Open any link in safari browser
- Directly some action on safari browser to share that link in my application.
Is this possible in iOS to share a link from browser to the app directly.
Need help about this.
Regards.
Starting from iOS 8 Using Share App Extension can achieve this task
I managed to do it by creating a Share extension app (File->New->Target->Application Extension)
Then from Targets->Info I specified support for web URLs
Then i spent time searching for a way to use original app files in the app extension and this post helped me a lot Sharing code between original iOS App and App Extension
If you are using cocoapods this can help you too https://stackoverflow.com/a/31989172/3033056 but be aware that not all pods are allowed to be used in app extensions
This is a link for a tutorial http://www.appcoda.com/ios8-share-extension-swift/
这篇关于在ios的safari中共享一个链接到我的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!