简体   繁体   中英

How to gather files from other apps in my React Native app with a simple iOS action extension?

This seems to be more difficult than I thought. I want to build an iOS action extension that accepts ZIP files and puts them somewhere so they can be read by my main app.

Looks like I'll have to set up an App Group for the main app and the share extension. However, react-native-fs does not seem to be able to read from the resulting shared directory (considering what is available here: https://github.com/itinance/react-native-fs#constants ).

And the regular AsyncStorage does not seem to be able to accomplish this either.

Any ideas?

I now have found this closed issue on react-native-fs that addresses exactly what I'm trying to do: https://github.com/itinance/react-native-fs/issues/278

Implementing that now and will edit this answer with any interesting gotchas as they emerge.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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