Closed emberist closed 3 years ago
Thanks @riccardocaranfil.
I see it currently is enabled in the Swift side, but not on the objective-c side. That's why the warning is shown I believe.
I think we need to disable main queue setup as they say it is only needed when you use UIKit during init: If your module does not require access to UIKit, then you should respond to + requiresMainQueueSetup with NO.
.
@jakubkoci is there a specific reason main queue setup is currently required?
https://reactnative.dev/docs/native-modules-ios#implementing--requiresmainqueuesetup
@TimoGlastra You're right. We shouldn't need access to the UI thread. I've created PR to fix this #27
@riccardocaranfil Thanks for pointing that out 👍
Just for notice, using the package in iOS the console prints
Module IndySdk requires main queue setup since it overrides
initbut 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.
Hope it will be useful