Is it possible to write a file to the iOS filesystem with Expo so that it is accessible via the iOS 11 Files app

1.9k Views Asked by At

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.

1

There are 1 best solutions below

0
On BEST ANSWER

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
    }
}