joltup / rn-fetch-blob

A project committed to making file access and data transfer easier, efficient for React Native developers.
MIT License
2.84k stars 783 forks source link

Unexpected error _NSPlaceholderDictionary on calling RNFetchBlob.ios.previewDocument(fPath) on M1 machines #792

Open Asad520 opened 2 years ago

Asad520 commented 2 years ago
"react": "17.0.1",
"react-native": "0.64.2",
"rn-fetch-blob": "0.12.0",
RNFetchBlob.config(configOptions)
      .fetch('GET', pdfSource.uri, pdfSource.headers)
      .then((res) => {
        if (!isAndroid) {
          RNFetchBlob.ios.previewDocument(fPath);
        }
        return res;
      })
      .catch((err) => console.log('errr:', err));

Calling RNFetchBlob.ios.previewDocument() function crashes the application on M1 machines. Same code works perfectly on non m1 machines.

simulator_screenshot_7BAF1B3D-1F48-422D-A713-FD278B670908

saurabhkanswal commented 2 years ago

@Asad520 any update on this ?

Asad520 commented 2 years ago

@saurabhkanswal couldn't make it work on M1. Had to use another machine. Same code worked perfectly on intel mac.

javiercejudo commented 2 years ago

As a workaround, I was able to preview documents with simulators running iOS 13.7 or older.