react-native-text-recognition
react-native-text-recognition copied to clipboard
requiresMainQueueSetup
Hi @JoeyEamigh!
At first launch of the iOS app, a warning appears in the console :
Module TextRecognition requires main queue setup since it overrides init but doesn't implement requiresMainQueueSetup. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
It works but maybe you can correct this warning?
TextRecognition.swift
@objc(TextRecognition)
class TextRecognition: NSObject {
Add the line below
+ @objc static func requiresMainQueueSetup() -> Bool { return true }
@objc(recognize:withOptions:withResolver:withRejecter:)
Works fine in my setting.
Thx @ElicaInc! @JoeyEamigh is it OK for you to create a PR for this?
Have at it! I don't really use this library anymore so I don't update it much but I would be happy to merge PRs!
It's up to @JoeyEamigh!
Done! https://github.com/JoeyEamigh/react-native-text-recognition/pull/14/files