giandifra / simple_share

A Flutter plugin for share image, video or file
MIT License
18 stars 15 forks source link

iOS - No such file #19

Open marianoarga opened 4 years ago

marianoarga commented 4 years ago

Hello, I'm getting this error only in iOS:

PlatformException(ERROR, The file “Comprobante%20de%20pago%20COEGV%20-1010_7132496_09-0530563-.pdf” couldn’t be opened because there is no such file., null)

I can open the file successfully from android studio console when I print the same path I'm using...

void openPdf(File file) async{
  print(file.uri.toString());
  try {
                    SimpleShare.share(
                      uri: file.uri.toString(),
                      title: "Comprobante de pago COEGV",
                      msg: "Comprobante de pago COEGV"
                    );
                  } catch(e){
                    debugPrint("EXCEPTION");
                    debugPrint(e.toString());
                  }
}

Path printed, wich I click and opens the file in my Mac: file:///Users/mariano/Library/Developer/CoreSimulator/Devices/3CA17A81-93F3-4AB9-99F5-EAFB9BB653F3/data/Containers/Data/Application/205B6C06-5951-4E81-8384-408ACAE1506F/Library/Caches/Comprobante%20de%20pago%20COEGV%20-1010_7132496_09-0530563-.pdf

marianoarga commented 4 years ago

Replaced spaces by hyphens, same result