itinance / itinance/react-native-fs

Write not working in release build

Open
#958 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
5k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

File write works when I test in debug locally, but in release the file doesn't get written to document storage even though there are no errors thrown. Tested on my Android 10 device.

```
export const writeCsvToFile = async () => {
const folderPath = `${RNFS.DocumentDirectoryPath}/${APP_NAME}`;
const folderExists = await RNFS.exists(folderPath);
if (!folderExists) {
await RNFS.mkdir(folderPath);
}

let contents = 'Name,Score,Percent\n';
const filePath = `${folderPath}/${APP_NAME}-${moment().format('YYYYMMDDHHMMss')}.csv`;
await RNFS.writeFile(filePath, contents);
}
```

react: 16.14.0 => 16.14.0
react-native: 0.63.3 => 0.63.3

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.