i’m pretty new in swift and have been engaged on a bug the entire day, is perhaps some easy factor i missed,
I’ve been making an attempt to implement QR code scanning function in my app. I used the package deal
“https://github.com/twostraws/CodeScanner”
Which i discovered of a youtube video,
That is my element that ought to render the scanner
import CodeScanner
import SwiftUI
struct QRScannerView: View {
var physique: some View {
CodeScannerView(codeTypes: [.qr], simulatedData: "Paul Hudson") { response in
swap response {
case .success(let consequence):
print("Discovered code: (consequence.string)")
case .failure(let error):
print("Right here: ",error.localizedDescription)
}
}
}
}
And i’m having the error
Can't discover 'CodeScannerView' in scope
However the factor is, even when i command-click the operate, it takes me to the operate within the package deal. Even with the error, i’m able to run the simulator, since simulators don’t permit for the digicam choice.
However the construct is failing. with the above error.
Please do take a look
I’ve tried:
- Cleansing Construct and re-installing
- Eliminated and re-installed the package deal
- Remoted the operate name, earlier it was in my web page view itself
non of those fastened the error