Woonivers / react-native-document-scanner

Document scanner, features live border detection, perspective correction, image filters and more ! 📲📸
MIT License
86 stars 71 forks source link

Manual capture not working on a real iOS device #47

Closed rosentoshev closed 4 years ago

rosentoshev commented 4 years ago

I followed the steps in the README.md, the react-native-document-scanner installed and is working correctly with an automatic capture on my test iPhone 5s. However, the manual capture is not working. I have read various issue threads here and tried this solution: https://github.com/Woonivers/react-native-document-scanner/pull/38/files However, I am still getting the following error when I try to manually capture with ref similar to the example.

ExceptionsManager.js:173 Exception 'This function must be called on the UIManager queue' was thrown while invoking capture on target RNPdfScannerManager with params (
    149
)
marcojr commented 4 years ago

Same here

rosentoshev commented 4 years ago

@marcojr I did manage to get the manual capture to work on iOS devices. In the root directory of the @woonivers/react-native-document-scanner package folder, open the ios folder. Then open RNPdfScannerManager.m and delete the following lines:

(dispatch_queue_t)methodQueue
{
    return dispatch_get_main_queue();
}