I can't open a PDF created with the iOS 15.0 simulator in Flutter, and the app crashes.
See original GitHub issueThe 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
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:9
- Comments:9
Top Results From Across the Web
Flutter app crashes for iOS build on startup - Stack Overflow
Run flutter clean · Navigate to the ios folder then delete the pods folder. · From your terminal command cd ios , then...
Read more >Fatal Exception: NSInternalInconsistencyException ... - GitHub
App crash on IOS 15.0.0 Steps to Reproduce I don't have a way to reproduce this issue. I only got this crash from...
Read more >Simulator crashes immediately upon launch - Apple Developer
Today, instantly crashes upon launch. I have run the XCode 9 simulator and reset simulator. I have "installed" XCode 10 from app store....
Read more >Flutter app crashes on hot restart only on iOS Simulator-Flutter
I had the same issue. After two days of debugging I have just found out it was caused by one of my dependencies....
Read more >Changelog - Proxyman
Fixed: Rare crash when opening iOS Simulator Setup Guide due to race-condition issue; Fixed: Proxyman Helper Tool displays incorrect information on macOS ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same issue
I am facing the same issue, But with the video file.