Closed hayr-hotoca closed 3 years ago
ooh there is an example let me try it then
Data should be a ImagePickerResponse type, and according definition you should use data.assets[0].uri, you coould check if make a console.log(response) right after the async function:
async (response: ImagePickerResponse) => { console.log(response.assets[0].uri) if (!response.assets[0].uri) { throw new Error('oh!'); } try { setImage(response); setResult(await MlkitOcr.detectFromUri(response.assets[0].uri)); } catch (e) { console.error(e); } }
import MlkitOcr from 'react-native-mlkit-ocr';
const resultFromUri = await MlkitOcr.detectFromUri(data.uri);
I tried to build through xcode and run again in my iPhone 6 but still having issue
Xcode 10.3 "react": "16.8.3", "react-dom": "16.8.3", "react-native": "0.59.10", "react-native-mlkit-ocr": "^0.2.2",
device: IPhone 6