Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XCode 12 Beta 6, compiler error #139

Closed
AndrexOfficial opened this issue Aug 27, 2020 · 5 comments · Fixed by #140
Closed

XCode 12 Beta 6, compiler error #139

AndrexOfficial opened this issue Aug 27, 2020 · 5 comments · Fixed by #140

Comments

@AndrexOfficial
Copy link

I was tying to build my project where I use RSBarcodes but I get a compiler error saying that: Value of type 'AVMetadataMachineReadableCodeObject' has no member 'corners'

It occurs on RSCodeReaderViewController.swift at line 401.

How can I fix it?

@yeahdongcn
Copy link
Owner

There used to be an extension:

extension AVMetadataMachineReadableCodeObject {

    @available(swift 4.0)
    @available(iOS 7.0, *)
    @nonobjc public var corners: [CGPoint] { get }
}

I don't' know why they are gone in Xcode 12 Beta 6. How about filing a FB to Apple?

@yeahdongcn
Copy link
Owner

I didn't find anything related on the release notes page (https://developer.apple.com/documentation/xcode-release-notes/xcode-12-beta-release-notes/), so maybe comment this line out for now (you won't see the corners drawn on the reader view).

@sammcewan
Copy link

Still a problem in GM 😬

@adougies
Copy link

Looks like someone has already filed, plus seems more properties have issues too: https://developer.apple.com/forums/thread/658471

Apple documentations suggests this hasn't been removed: https://developer.apple.com/documentation/avfoundation/avmetadatamachinereadablecodeobject/2926566-corners

Someone interestingly said:

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

This means, as the bug appears to only affect the simulator, the following code can be used to fix the error until the issue is resolved.

#if !targetEnvironment(simulator)
     cornersArray.append(barcodeObject.corners)
#endif

@yeahdongcn
Copy link
Owner

yeahdongcn commented Sep 18, 2020

🎉 Congrats

🚀 RSBarcodes_Swift (5.1.0) successfully published
📅 September 17th, 20:01
🌎 https://cocoapods.org/pods/RSBarcodes_Swift
👍 Tell your friends!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants