I'm currently writing an audio recording to the iOS filesystem using the Expo library for React Native. I'm using the FileSystem.documentDirectory
as per the expo docs, however this file isn't accessible when using the iOS11 Files app. Is it possible with Expo to write somewhere which allows this, or failing that to iCloud? It seems like the FileSystem.documentDirectory
is a sandboxed area within the filesystem.
Asked
Active
Viewed 1,658 times
1

Archimedes Trajano
- 35,625
- 19
- 175
- 265

baseten
- 1,362
- 1
- 13
- 34
-
The iOS App needs to "opt in" into sharing. Maybe start with [iOS 11 Files App: How to include files from app bundle](https://stackoverflow.com/questions/44395988/ios-11-files-app-how-to-include-files-from-app-bundle) – MadProgrammer Jul 08 '18 at 20:11
-
I have added both `UISupportsDocumentBrowser` and `UIFileSharingEnabled` to expo's `app.json` as below. I tried both `true` and `"YES"` but neither seems to work. I suspect this is something that Expo just doesn't expose yet: `"ios": { "supportsTablet": true, "infoPlist": { "UISupportsDocumentBrowser": true, "UIFileSharingEnabled": true } }` – baseten Jul 09 '18 at 09:54
1 Answers
3
Actually it appears that it does work, but you have to build the actual iOS app .ipa file. It wasn't working from expo via simulator, but once I was testing via TestFlight the files did appear in the Files app.
The ios
key of Expo's app.json
looks like this. I haven't tested whether all of these keys are required:
"ios": {
"infoPlist": {
"UISupportsDocumentBrowser": true,
"UIFileSharingEnabled": true,
"LSSupportsOpeningDocumentsInPlace": true
}
}

baseten
- 1,362
- 1
- 13
- 34