gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-28 23:56:05 27 4
gpt4 key购买 nike

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

最佳答案

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

Expo 的 app.jsonios 键如下所示。我尚未测试是否需要所有这些键:

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

关于javascript - 是否可以使用 Expo 将文件写入 iOS 文件系统,以便可以通过 iOS 11 文件应用程序访问该文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51235600/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com