swiftScan icon indicating copy to clipboard operation
swiftScan copied to clipboard

Xcode 12 模拟器上运行报错:Value of type 'AVMetadataMachineReadableCodeObject' has no member 'corners'

Open devchena opened this issue 3 years ago • 8 comments

devchena avatar Sep 18 '20 03:09 devchena

我特么也遇到这个问题了

andi911 avatar Sep 21 '20 01:09 andi911

屏蔽掉

andi911 avatar Sep 21 '20 01:09 andi911

应该增加#if !targetEnvironment(simulator)判断。真机运行是没问题的。 来源:https://developer.apple.com/forums/thread/658471 原话:This happened before and is related to how obj-c symbols are imported in Swift, not deprecation/removal of API. corners at least exists in the non-simulator SDK, so you can perhaps work-around using #if !targetEnvironment(simulator).

vjieshao avatar Sep 21 '20 06:09 vjieshao

应该增加#if !targetEnvironment(simulator)判断。真机运行是没问题的。 来源:https://developer.apple.com/forums/thread/658471 原话:This happened before and is related to how obj-c symbols are imported in Swift, not deprecation/removal of API. corners at least exists in the non-simulator SDK, so you can perhaps work-around using #if !targetEnvironment(simulator).

有道理,针对模拟器屏蔽掉

andi911 avatar Sep 21 '20 06:09 andi911

应该增加#if !targetEnvironment(simulator)判断。真机运行是没问题的。 来源:https://developer.apple.com/forums/thread/658471 原话:This happened before and is related to how obj-c symbols are imported in Swift, not deprecation/removal of API. corners at least exists in the non-simulator SDK, so you can perhaps work-around using #if !targetEnvironment(simulator).

有道理,针对模拟器屏蔽掉

image 直接这样吗?

zzzkj avatar Sep 21 '20 06:09 zzzkj

应该增加#if !targetEnvironment(simulator)判断。真机运行是没问题的。 来源:https://developer.apple.com/forums/thread/658471 原话:This happened before and is related to how obj-c symbols are imported in Swift, not deprecation/removal of API. corners at least exists in the non-simulator SDK, so you can perhaps work-around using #if !targetEnvironment(simulator).

有道理,针对模拟器屏蔽掉

image 直接这样吗?

看不到图片,直接针对模拟器处理代码就好,然后编辑就不会报错了

andi911 avatar Sep 21 '20 06:09 andi911

应该增加#if !targetEnvironment(simulator)判断。真机运行是没问题的。 来源:https://developer.apple.com/forums/thread/658471 原话:This happened before and is related to how obj-c symbols are imported in Swift, not deprecation/removal of API. corners at least exists in the non-simulator SDK, so you can perhaps work-around using #if !targetEnvironment(simulator).

有道理,针对模拟器屏蔽掉

image 直接这样吗?

是这样。

vjieshao avatar Sep 21 '20 06:09 vjieshao

👍

devchena avatar Oct 09 '20 02:10 devchena