小编at_*_*_II的帖子

React Native iOS从apps Documents文件夹中读取图像

我必须将图像下载到我的iOS应用程序本地文件系统并阅读它们.

在我的模拟器上,我可以看到我的应用程序的文件系统与目录

/Library/Developer/CoreSimulator/Devices/[UUID]/data/Containers/Data/Application/[UUID]/

/Documents
/Library
/tmp
Run Code Online (Sandbox Code Playgroud)

试试我将foo.png复制到/ Documents文件夹然后尝试了

<Image source={{uri: "file://Documents/foo.png"}} style={{width:100, height:100}}/>
Run Code Online (Sandbox Code Playgroud)

这不起作用,任何想法都是这样做的.

ios react-native

6
推荐指数
2
解决办法
6776
查看次数

标签 统计

ios ×1

react-native ×1