OGeek|极客世界-中国程序员成长平台

标题: ios - 调用 React Native App 从浏览器接收共享信息 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-11 19:38
标题: ios - 调用 React Native App 从浏览器接收共享信息

如果您使用过 Pinterest,您知道在 Safari 或 Chrome 中,如果您点击分享按钮,pinterest 将显示在分享选项中

enter image description here

然后,如果您点击 pinterest 图标,该应用程序将以模式弹出,因此您可以选择要保存到的图像和板

enter image description here

我的问题是:我们可以在 React Native 中做到这一点吗?我的意思是我希望我的应用显示在共享选项中并可以从中接收数据。



Best Answer-推荐答案


虽然我自己还没有实现这一点,但我有兴趣让我的 React-Native 项目既可以接收数据,也可以与其他应用共享数据。下面是一些似乎可以做到这一点的项目和文章的链接:

从其他应用接收

https://github.com/alinz/react-native-share-extension

https://codeburst.io/building-a-mobile-share-extension-for-a-react-native-app-bff4ef91d44f

https://github.com/meedan/react-native-share-menu <- 将应用添加为接收器(未维护代码,2018 年 5 月)

分享到其他应用

https://facebook.github.io/react-native/docs/share.html <- 官方向其他应用发送数据的API

https://github.com/EstebanFuentealba/react-native-share <- 分享社交,向其他应用发送简单数据

关于ios - 调用 React Native App 从浏览器接收共享信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43894376/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4