简体   繁体   中英

how to save file from an iOS react native app to Files folder

I created a pdf file in my react native app for iOS devices, and also I can open the file in my application because it saved in Documents directory of internal storage of my application, but I want to save the file to Files folder in iOS and open it with other applications, how can I do it? thank for your attention.

For IOS you should open share options and save the file to the Files folder. For this you can use 'react-native-share' library. If you are using Expo, use 'expo-share'. Please check below documentation.

https://www.npmjs.com/package/react-native-sharing

https://docs.expo.dev/versions/latest/sdk/sharing/

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