Closed ferranJS closed 2 years ago
angular target in tsconfig is es5 because of it is an old iPhone and info.plist camera permissions are set
@fewNeurons the ml-kit branch is a complete work in progress (and kind of a mess) and it is very well possible that the requestPermission stuff is broken. The plan was to rewrite the permission check completely since the current implementation is far from perfect anyways, so my plan was to use the same implementation that is used in https://github.com/ionic-team/capacitor-plugins/tree/main/camera
A simple workaround for now would be to just use this plugin for the permission check, with this workaround you can at least test the ml-kit implementation....
Unfortunately this branch does not have the highest priority atm since I was not able to find anyone who is willing help me develop the android part of it (I am not really used to develop Android apps and it would take me ages to do that all myself).
Thank you anyways for testing it out and I will have a loot at it once I find time to do so.
Right now I think that we need to create a different plugin for the ml-kit stuff anyways, I am not sure about this.
Hi @thegnuu, thank you for your response and your workaround suggestion. Another plugin seams right in a future. I have been thinking of implementing the Android version myself. I will be updating you about my progress!
If you are willing to implement some android code and help out here this would be awesome. The current "discussion" is found here #107
I will close this issue for now, keeping this issue in my backlog for the ml-kit stuff. Feel free to ask question or post news on the ml-kit issue!
Thank you!
Hi again, I've made it able to work in this quick demo https://github.com/fewNeurons/barcode-scanner-test.
@ferranJS Can you please share how did u resolve it Facing similar issues in mlkit Error calling method requestPermissions on plugin BarcodeScanner: No method found.
Describe the bug This problem ocurrs when trying to calling BarcodeScanner.checkPermissions() function in iOS in ml-kit branch: ⚡️ To Native -> CapacitorCommunityBarcodeScanner checkPermissions 131742848 ⚡️ TO JS undefined ⚡️ [log] - status: undefined ⚡️ [log] - some problem with the camera
The start method returns -1. The request permission method does return an error, but I'm assuming by the plugin.m file that it isn't really implemented.
To Reproduce Steps to reproduce the behavior:
npm run build -> npx cap sync -> npx cap run ios or in xcode Then when app launches and I click the button where the method is associated, xcode gives me that error.
Expected behavior That the app the functions work as intended, giving me a valid value.
Version package.json:
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context It is a new blank project. The project compiles in www without problems and the version of the plugin indicated in xcode when compiling is 3.0.1 so I don't understand how this is happening. The code: html:
page.ts: