I am trying to use MLKit
in my project, but I can't initialize TextRecognizer
. I tried this:
textRecognizer = TextRecognizer.textRecognizer()
Which gives a warning:
'textRecognizer()' is deprecated: Please use
textRecognizer(options:)
instead
However, when I try to initialize it this way:
let options = CommonTextRecognizerOptions.init()
textRecognizer = TextRecognizer.textRecognizer(options: options)
I get this error:
'init()' is unavailable
How am I supposed to initialize it then?
Thank you for your help