I am working on a React Native application that:
- Picks a file using react-native-document-picker.
- Moves the file to persistent storage using react-native-fs (RNFS).
- Encrypts the file using AES-256.
- Uploads the encrypted file to a backend.
- This setup works perfectly on Android, but on iOS (both simulator and real devices), the file "disappears" before uploading. Here’s what I observe:
File is picked successfully. ✅
File is moved to persistent storage (RNFS.DocumentDirectoryPath). ✅
File is encrypted successfully and stored with _encrypted suffix. ✅
Upload request is triggered. ✅
Suddenly, the encrypted file does not exist. ❌ "No such file" error.
logs from ios simulator
LOG