react-native-blob-util
react-native-blob-util copied to clipboard
[iOS][Regression] ReactNativeBlobUtilFS.readFile returns null for utf-8 if encoding fails
Upgrading from 0.15.0 to 0.17.1.
We use ReactNativeBlobUtilFS.readFile sometimes to read png files and encrypted files during tests so we can compare the content to verify behavior.
After the upgrade, we've noticed that ReactNativeBlobUtilFS.readFile was returning null whenever we try to read those files as utf-8.
We noticed the logic around that bit changed (ie instead of returning a NSString, the library now returns a NSData): https://github.com/RonRadtke/react-native-blob-util/commit/bbcd0f1c18ae168e52634726faa059271ca83097#