regulaforensics / react-native-document-reader

React-Native Framework for reading and validation of identification documents
19 stars 10 forks source link

Initialization on iOS take some time #6

Open Johny8811 opened 3 years ago

Johny8811 commented 3 years ago

Hi guys,

this is my implementation of scanner

`export const scanDocument = async () => { try { await readLicence(); } catch (error) { throw error; }

try { await setOCRConfig(); } catch (error) { throw error; }

try { return await showScanner(); } catch (error) { throw error; } };`

I call this method in useEffect but scanner will not start on iOS, without any error.

useEffect(() => { scanDocument(); }, []);

I tried add some timeout. 300ms scanner start correctly, below 300ms scanner doesn't work.

Android works correctly, scanner start immediately after component is mounted.

What is wrong??

vyakimchik commented 3 years ago

Hi @Johny8811,

Are you able to successfully start the scanner in our demo project that is available in this repository?

Thanks!

Johny8811 commented 3 years ago

Hi @vyakimchik,

yep, I started it but problem is only only on physical device, on simulator scanner start correctly.

Thanks.

vyakimchik commented 3 years ago

@Johny8811,

Are you experiencing this issue only with one device or with any physical device you have?

Johny8811 commented 3 years ago

I tried it on iPhone 12 pro 14.4 and on another iPhone 12 14.4.2.

vyakimchik commented 3 years ago

I've tried also to run on iPhone 12 pro but didn't notice what you mentioned. Could you please record and send us the video where you demonstrate the reproduction of the issue in our app? You can send the video to support@regulaforensics.com.

Have you changed anything in our demo project to reproduce the issue?

Thanks!

vyakimchik commented 3 years ago

Hi @Johny8811,

Are you still experiencing the issue?