是否可以使用 Expo 将文件写入 iOS 文件系统,以便通过 iOS 11 Files 应用程序访问它

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

我目前正在使用 React Native 的 Expo 库将录音写入 iOS 文件系统。我按照 the expo docs 使用 FileSystem.documentDirectory,但是使用 iOS11 文件应用程序时无法访问此文件。 Expo 是否有可能在允许这个的地方写,或者不能写到 iCloud? FileSystem.documentDirectory 似乎是文件系统中的沙盒区域。

实际上它似乎确实有效,但您必须构建实际的 iOS 应用程序 .ipa 文件。它无法通过模拟器从 expo 运行,但是一旦我通过 TestFlight 进行测试,文件就会出现在文件应用程序中。

Expo app.jsonios 键看起来像这样。我还没有测试是否需要所有这些密钥:

"ios": {
    "infoPlist": {
        "UISupportsDocumentBrowser": true,
        "UIFileSharingEnabled": true,
        "LSSupportsOpeningDocumentsInPlace": true
    }
}