-
Notifications
You must be signed in to change notification settings - Fork 703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zxing crash on iOS 10 #421
Comments
Same for me. Xamarin Forms 2.3.2.127
|
Ok, I found the solution. Just add the NSCameraUsageDescription key to info.plist
|
Works. Thanks @iMacX |
Unfortunately, that fix doesn't seem to work for iOS apps. I also tried it by creating a new blank single view iOS app but it crash on that as well. With or without the NSCameraUsageDescription in plist.info. Shortened stacktrace:
|
lokan82, do you think this problem might be related to #422 |
Thanks @iMacX |
the fix doesnt work for me either |
This fixed for me, for god sake Xamarin, hire a QA team... I like your product but I can't dev 10min without stuff like that constantly happening :( |
@NicolasDorier This bug has nothing to do with xamarin. It's a new requirement in iOS 10 introduced by Apple. |
@iMacX so maybe at least a nice exception instead of a saddistic segfault error, would save some man-hours. |
The fix from @iMacX doesn't work for me either. Xamarin.iOS 10.0.0.1
|
I found that it works when debugging on a real device, when I use the simulator it dies with the error above. |
@lokan82 we're getting the same crash on real devices. Are you seeing it work on real devices with or without the |
With NSCameraUsageDescription added to info.plist |
Got exactly the same issue. Does a fix is on the road? Regards, |
Even with NSCameraUsageDescription added to info.plist it's not working for me. |
@NicolasDorier Apple decided to cause a segfault in iOS 10 if you are missing the info.plist entry, this isn't xamarin's fault. Furthermore this Lib is not officially supported by Xamarin, I just happen to work at Xamarin and work on it in my spare time. So apologies if this free and open source project isn't quite perfect. You are always welcome to submit a PR with any fixes and improvements even if it's just updating the README. Cheers! |
@Redth sorry, I was not even using ZXing when I encountered this exception. Somehow, I thought I was commenting on the Xamarin project. This problem can't be fixed at ZXing level, it is the fault of Xamarin. |
On iOS 10, I've made it worked by adding
|
I could fixed the problem. my source is below. |
I haven't encountered this issue because I don't have an iOS 10 device. I was thinking about upgrading my iOS 6S, but I hate applying Apple updates. I'm currently using Zxing.Net.Mobile -Version 2.0.4.46 and Zxing.Net.Mobile.Forms -Version 2.0.4.17 in my XF iOS app and it works great. I am also running Xamarin.iOS 9.6.2.2. Do I need to add NSCameraUsageDescription to info.plist in order for my app to work with iOS 10? Do I need to do anything else? Thanks in advance for the help and clarification. |
Add the new entry to the info.plist worked for me. |
Project worked after adding to Info.plist Property::"Privacy - Camera Usage Description" // Value::"Taking picture barcode". |
Just sharing for someone novice like me....my key worked but only after cleaning the solution |
I am glad that I found this post and it did indeed resolve the problem for me too. Having said that: can anyone explain what the root cause of this is ? How can it be prevented in the future ... it seems like a coding mistake in the underlying infrastructure, someone must have added this description and forgot to check whether the string was initialized before using it. So a null pointer was probably encountered (just guessing here), was it Apple or Xamarin ? The stack traces are not particularly useful, but I guess you need debug versions of the libraries to make that more descriptive. BTW do we need to include the string in Localizable strings to make it readable for non-English users ? |
I am have IOS 9.3.5 installed and it works fine when i am debugging. When I run the app normal it crashes the application after the barcode is scanned. Any ideas why? ZXing.Net.Mobile = 2.2.9 Update: |
Thanks for reporting this issue! Unforunately it took me way too long to respond 😭. Sorry, I apologize! Recently the source code for this project was completely refactored to modernize it. Many PR's were included in this effort, and many bugs were hopefully fixed. Please try out the latest 3.x series of NuGet packages (currently in prerelease). To try and make the project more maintainable in my spare time going forward, I've decided to close all existing issues to start with a clean slate. If you're still experiencing this issue on the newest version, please open a new issue with as much detail as possible. Thank you for your patience and understanding! Happy scanning! |
Hi Redth, |
Hi,
we are using the latest stable version of Zxing (2.1.47) and it crashes on iOS 10.0.1.
Are you aware of this? Any fix on the road?
Thank you
The text was updated successfully, but these errors were encountered: