twostraws / CodeScanner

A SwiftUI view that is able to scan barcodes, QR codes, and more, and send back what was found.
MIT License
1.02k stars 293 forks source link

Fix build for Xcode 13 beta 3 #37

Closed kkostov closed 3 years ago

kkostov commented 3 years ago

In beta 3, linking to Swift Packages using APIs normally unavailable to application extensions now results in a build error: cf https://developer.apple.com/documentation/xcode-release-notes/xcode-13-beta-release-notes#Swift-Packages

This PR addresses the issue by replacing the use of UIApplication.shared (which is indeed unavailable to app extensions) with a view controller API.

twostraws commented 3 years ago

Thank you!