Closed micksabox closed 7 years ago
What do we need to do to get this fixed in the current branch? Test iOS 7 with the change?
@LeBlaaanc or be sure that it won't cause a crash. I never used this &AVMetadataObjectTypeDataMatrixCode
to check existence of a constant at runtime, so I can't say much about if that will cause a runtime crash.
Another option is to just ensure you're deploy target is greater than X, where the iOS SDK in version X contains the constant your checking against.
@micksabox right, I just was curious how we get this merged in, we target iOS 9+ and it works fine.
I think I spoke too soon @micksabox did you have issues with this only in production? Our reader picks up interleaved2of5 unless it's compiled.
Hey @LeBlaaanc I'm not sure, I found this issue in dev, haven't tried in production.
Can we get this changed to use &AVMetadataObjectTypeDataMatrixCode
etc. now?
Not sure what level of backwards compatibility is required for iOS 7 now?
I see there is already a PR at #401 that works well for me 👍
This is now merged into master with #586 https://github.com/lwansbrough/react-native-camera/commit/371a6a0dfaec1aa744087e3ceb0deb404055b189
Steps to reproduce
Expected behaviour
po self.barCodeTypes
should print out all the barCodeTypes supported, which should include the interleaved2of5, itf14, datamatrix typesActual behaviour
These types are missing.
How to fix
The current implementation checks the available types using
in RCTCameraManager.m -constantsToExport. I found that this worked for me:
but I'm not sure how that will work on an iOS 7 device.
Environment
react-native-camera
Version: git+https://github.com/lwansbrough/react-native-camera.git