Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 12 AVMetadataMachineReadableCodeObject issue

Tags:

xcode

ios

swift

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

like image 248
PoolHallJunkie Avatar asked Dec 13 '22 08:12

PoolHallJunkie


1 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.

like image 126
Lucas Dahl Avatar answered Jan 11 '23 20:01

Lucas Dahl