Closed JakobStadlhuber closed 4 years ago
Do you followed the Instructions for IOS ?
Yes I did.
If try the Xcode runner I also get a error:
Multiple commands produce '/Users/jakob/Library/Developer/Xcode/DerivedData/Runner-cxqwghcvmizreufqmpetnzcxveiq/Build/Products/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework':
1) Target 'Runner' has copy command from '/Users/jakob/Downloads/flutter_barcode_reader-master/example/ios/Flutter/Flutter.framework' to '/Users/jakob/Library/Developer/Xcode/DerivedData/Runner-cxqwghcvmizreufqmpetnzcxveiq/Build/Products/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework'
2) That command depends on command in Target 'Runner': script phase “[CP] Embed Pods Frameworks”
Mhhm I am also not a pro in Flutter, but after a short research, I found that fix: https://github.com/flutter/flutter/issues/20685#issuecomment-413524718 maybe this also could work for you.
Thanks @HannHank I can deploy it now. One last problem: "The user did not grant the camera permissions!" I added this:
NSCameraUsageDescription Camera permission is required for barcode scanning.
but it is still not working, can I manually add permissions or how can I fix it?
Mhhm normally you add the permission as I mentioned before. I am not very familiar to ios, but I guess you can add camera permission manually in the ios settings ? There must be a toggle switch to allow your flutter app the usage of the camera
I am having the same issue on iOS something is amiss with the permissions. It should be prompting for permission before displaying the error?
yea exactly there is no prompting. thats strange.
Can you set the app permission in the ios settings ?
OK so did a little more playing this morning and figured a couple of things out. One, on the simulator I was unable to get this to work. I believe that is because there is no camera support. On a physical device, I had to set up signing for the debug build than I started to get prompted. You might want to make a note about the simulator.
Okay that is interesting, because if you are using an Android simulator you where also prompted. So it seems that just ios Simulator don't work with camera usage. So the issue can be closed ?
You have to use the legacy build system. (Xcode: Files-> Project/Workspace Settings -> Build system)
I tried the example without changes on iOS but it did not run. On Android it works fine. Other iOS Apps on flutter works also fine.