evermeer / PassportScanner

Scan the MRZ code of a passport and extract the firstname, lastname, passport number, nationality, date of birth, expiration date and personal numer.
BSD 3-Clause "New" or "Revised" License
457 stars 101 forks source link

'Camera' cannot be constructed because it has no accessible initializers #32

Closed mrhaxic closed 5 years ago

mrhaxic commented 5 years ago

Building on Swift 4 and get the below error

'Camera' cannot be constructed because it has no accessible initializers

evermeer commented 5 years ago

The demo app is build against Swift 4.2? Is that also the version you are using?

Do you get the error on this line? camera = try Camera(sessionPreset: AVCaptureSession.Preset.hd1920x1080) I do remember that the AVCaptureSession enum was changed somewhere in version 4.

mrhaxic commented 5 years ago

Actually, the app is running on Swift 4.0 but I already used pods on Swift 4.2 and I didn't face that issue. Yes I got an error on the below line

camera = try Camera(sessionPreset: AVCaptureSession.Preset.hd1920x1080)

evermeer commented 5 years ago

What is the PassportScanner version that you use? It should be 4.4.0. If I change the demo app to Swift 4, then it still compiles

mrhaxic commented 5 years ago

I will try and get back to you

evermeer commented 5 years ago

Did you solve this issue?