twostraws / CodeScanner

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

There is a problem when adding it to an iOS project with watchOS. #128

Open FuncLinKrey opened 5 months ago

FuncLinKrey commented 5 months ago

Hello, I'm an Entry-level independent developer.This is the first time I submit new issue. Please understand if the description is not clear enough. It may not be your problem, but I'd better give you feedback.

I have an iOS project with watchOS that needs to use CodeScanner. If I only import this package into the iOS version, there will be lots of errors when running watchOS preview.

截屏2024-02-12 20 12 08

Xcode automatically adds the package to watchOS.But it's no problem to run on the real Apple Watch and Apple Watch simulator. Please refer to the picture for specific performance.

截屏2024-02-12 20 12 20 截屏2024-02-12 20 12 31

saamerm commented 1 month ago

@FuncLinKrey that's because "UIViewController" that the package uses, is only available on iOS. Not on any other frameworks