首页 文章

React Native Share Extension - 访问AsyncStorage?

提问于
浏览
2

我正在研究一个本机的应用程序,并正在看一些在应用程序中创建“共享扩展”的教程 . 我在npm react-native-share-extension上看到如何在xcode中创建项目中的扩展,并使用第二个AppRegistry创建一个新组件(从npm示例中显示) .

//index.ios.js 
import React from 'react'
import { AppRegistry } from 'react-native'

import App from './app.ios'
import Share from './share.ios'

AppRegistry.registerComponent('Sample1', () => App)
AppRegistry.registerComponent('MyShareEx', () => Share)

有谁知道共享组件是否可以访问AsyncStorage中主应用程序存储的数据? (即我的登录令牌)

谢谢!

1 回答

相关问题