Xcode 12 AVMetadataMachineReadableCodeObject issue

Viewed 1041

Looks like the "corners" property of AVMetadataMachineReadableCodeObject is somehow missing using Xcode 12.

It is still mentioned in the documentation but the compiler fails with

"Value of type 'AVMetadataMachineReadableCodeObject' has no member 'corners'". 

I am importing AVFoundation

2 Answers

This is currently a bug from what I can tell and was in the beta, try using #if !targetEnvironment(simulator) as that worked for people in the beta.

Edit: This was also a problem in other versions of Xcode with the same fix, and may also be a problem in Xcode 13 as well, just a heads up.

It seems the XCode bug has been fixed in XCode 12.1.

Related