open_file icon indicating copy to clipboard operation
open_file copied to clipboard

I can't open a PDF created with the iOS 15.0 simulator in Flutter, and the app crashes.

Open xcoinmakers-akiyama opened this issue 2 years ago • 10 comments

The Flutter app crashes with open_file. PDF can be created, displayed and downloaded normally on the actual Android device.

I changed the iOS 15.0 simulator from iPhone 13 Pro Max to iPhone SE (2nd), restarted Android Studio, and tried flutter clean, but it didn't improve.

Execution environment

macOS BigSur / Android Studio / Simulator iOS 15.0

code

【pubspec.yaml】

dependencies:
	open_file: ^3.2.1
	pdf: ^3.6.1

【main.dart】

createPdf{
	final Document pdf = Document();
	pdf.addPage(
	  Page(
			~~~~
		),
	);
	final String dir = (await getApplicationDocumentsDirectory()).path;
	final String path = '$dir/report.pdf';
	final File file = File(path);
	await file.writeAsBytes((await pdf.save()));
	OpenFile.open(path); // ← Flutter app crashes here
}

xcoinmakers-akiyama avatar Nov 10 '21 05:11 xcoinmakers-akiyama

I am facing the same issue, But with the video file.

shofizone avatar Nov 16 '21 10:11 shofizone

Same issue

jprobert avatar Jan 04 '22 13:01 jprobert

Any solution to this?

JulianBissekkou avatar Mar 08 '22 08:03 JulianBissekkou

Same issue here

c2webstudio avatar Mar 10 '22 09:03 c2webstudio

Same issue (only in debug mode), is there a solution ?

jeromeDms avatar Jun 13 '22 14:06 jeromeDms

any solution for this?

Matishock1 avatar Jul 28 '22 05:07 Matishock1

same issue

BLACKCAT25896 avatar Aug 31 '22 12:08 BLACKCAT25896

is this package still maintained? because I see no response or any activity for this issue :-(

bahag-roostap avatar Oct 10 '22 08:10 bahag-roostap

same issue as well. works perfectly fine on android though but crashes on ios

dubemezeagwu avatar Nov 17 '22 05:11 dubemezeagwu

Mismo problema, alguien le encontro solucion?

Angel1404 avatar Jan 13 '23 21:01 Angel1404