I am developing app where local files are stored in user phone's file system. When I try to check if file exists with
var info = await FileSystem.getInfoAsync(`${AppConstants.APP_FOLDER}/main.png`);
console.log(info.exists);
It will print true. But if I try to read contents of file after checking:
var content = await FileSystem.readAsStringAsync(`${AppConstants.TILE_FOLDER}/main.png`);
console.log(content.length);
It freezes and nothing will be printed. I've tested my app on IOS in Expo Go.
The filepath is like that: file:///var/mobile/Containers/Data/Application/.../app_folder/main.png
File system works properly with loading online files by url and images can be shown, while in my case they can't. How should I solve my problem? What additional data I need to provide? Thanks.