title: How to save downloaded files and view in File app using React Native in iOS?
body: <p>I am using <strong>react-native-fs</strong> to download files from server and save them. Once they are downloaded I am using <strong>react-native-file-viewer</strong> to open them. This process totally works fine: I am able to download and open it in the viewer, but I am not able to save the file in the File application from the viewer, though I can save in iCloud but not in the iPhone.
  The downloaded file is stored in a place like </p>
  
  <pre><code>/var/mobile/Containers/Data/Application/CCF6CD16-A62A-48BB-92F3-3021195CFE0C/Documents/react-native-pdf.pdf
  </code></pre>
  
  <p><strong>but this is not shown in the File app.</strong></p>
  
  <p>The code I am using to download and view the file is as follows</p>
  
  <pre><code>    RNFS.downloadFile({
        fromUrl: 'http://www.mywebsite.com/react-native-pdfurl.pdf',
        toFile: `${RNFS.DocumentDirectoryPath}/react-native-pdfurl.pdf`,
      }).promise.then((r) =&gt; {
        console.log('yo yo yo ');
        this.setState({ isDone: true });
  
        const path = `${RNFS.DocumentDirectoryPath}/react-native-pdfurl.pdf`;
        FileViewer.open(path)
        .then(() =&gt; {
            // success
        })
        .catch(error =&gt; {
            // error
        });
  
        RNFS.readDir(RNFS.DocumentDirectoryPath).then(files =&gt; {
            console.log(files);
        })
          .catch(err =&gt; {
  
              console.log(err.message, err.code);
  
          });
      });
  </code></pre>
  
  <p>The readDir gets me the name path of the file saved. But this is not reflected in any folder in the File application.
  My question is how can I save the file in a way that it shows in the File application.  </p>