I want to detect QR codes on CIImage and wrote code including below two lines.
NSDictionary *detectorConfiguration = [NSDictionary dictionaryWithObjectsAndKeys:CIDetectorAccuracyHigh, CIDetectorAccuracy, nil];
CIDetector *detector = [CIDetector detectorOfType:CIDetectorTypeQRCode context:nil options:detectorConfiguration];
But unexpectedly "detector" is nil after the second line executed, and so detection fails.
This issue always occurs on some devices and never occurs on other devices.
It seems to depend also on iOS versions.
For example, tested by simulator, "detector" is nil on
iPhone5 (iOS8.4)
iPhone5 (iOS9.0)
iPhone5s (iOS8.4)
while non-nil on
iPhone5s (iOS9.0)
For other detector types (rectangle, face, text on iOS9.0), this issue doesn't seem to occur.
Does anybody know why this occurs? Thanks.