DEV Community

Cover image for How To Use Ionic Native Plugins In React Capacitor Mobile Application

How To Use Ionic Native Plugins In React Capacitor Mobile Application

Aaron K Saunders on March 25, 2020

When working with Ionic Capacitor it is recommended to use the Capacitor Plugins sometimes you need to use a cordova or ionic-native plugin to get ...
Collapse
 
shaneparsons profile image
Shane Parsons

Thank you for detailing what to do in the event of a PFEmbeddedMulticasterImplementation error!

I wasn't actually following this tutorial, but I ran into that error while developing an angular / capacitor app (after updating xcode?) and had no idea what to do. Thankfully the keyword PFEmbeddedMulticasterImplementation brought me here!

Collapse
 
aaronksaunders profile image
Aaron K Saunders Ionic

Thanks for stopping by either way, glad I was able to help

Collapse
 
eichgi profile image
Hiram

I am experiencing this issue:

error FileTransferError {code: 3, source: "postfun.com/wp-content/uploads/201...", target: "file:///android_asset/file.jpg", http_status: 401, body: null, …}

Do you have an idea why?

the following is my code:

download() {
      console.log("download");
      let fileTransfer = FileTransfer.create();
      const url = "https://www.postfun.com/wp-content/uploads/2019/09/Hickory-horned-devil-82819.jpg";
      fileTransfer.download(url, File.applicationDirectory + "file.jpg", true, {mode: 'no-cors'})
          .then(async entry => {
                console.log("download complete: " + entry.toURL());
                // need to convert url so you don't get permission errors...
                this.image = (Capacitor.convertFileSrc(File.tempDirectory + "file.jpg"));
              },
              error => {
                // handle error
                console.log("error", error);
              })
          .catch(error => {
            console.log("ERROR: ", error);
          });
    },
Enter fullscreen mode Exit fullscreen mode
Collapse
 
arushnath profile image
ArushNath

I am also facing this issue, did you find any solution?