regulaforensics / DocumentReader-Flutter

Flutter plugin for reading and validation of identification documents
MIT License
29 stars 13 forks source link

Crash on iOS when call DocumentReader.showScanner() #15

Closed ChenPingSheng closed 2 years ago

ChenPingSheng commented 2 years ago

flutter_document_reader_api: ^6.2.0 flutter_document_reader_core_fullrfid: ^6.2.0 macOS Monterey 12.2.1, Xcode 13.3, flutter 2.8.1 image

pkandrashkou commented 2 years ago

Hi, @ChenPingSheng!

Thank you for reporting this issue, we are aware of this crash. We are currently working on fixing this problem.

For now, in order to avoid this issue, please make sure to call initializeReader method before calling any other functionality. This is the only intended way to use our SDK, however it happens to be that we have a crash if there was no initialization call at all.

https://docs.regulaforensics.com/develop/doc-reader-sdk/mobile/flutter/initialization/

Best regards, Pavel

ChenPingSheng commented 2 years ago

@pkondrashkov Thanks for the quick reply, I will try it.

bqubique commented 2 years ago

For me, the issue was the device orientation. I enabled Portrait, Upside Down, Landscape Left/Right on Xcode and it worked. I guess the activity (or whatever the iOS equivalent is) started off in one of the orientations above that I had not enabled on Xcode, and enabling it let me see the viewfinder of the camera. Another note, the above solution by pkondrashkov did not help me unfortunately, but it might be a good practice nonetheless.