react-native-kontaktio icon indicating copy to clipboard operation
react-native-kontaktio copied to clipboard

Run KontaktBeacons in background thread instead of main thread

Open JonasWho opened this issue 6 years ago • 3 comments

React Native will eventually, in future versions, demand that plugins opt in or out of running on the main thread. I get this Warning when running react-native-kontaktio in RN 0.52.0:

Module KontaktBeacons requires main queue setup since it overrides constantsToExportbut doesn't implementrequiresMainQueueSetup. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.

JonasWho avatar Feb 06 '18 20:02 JonasWho

perhaps the heading of this issue should be: Run KontaktBeacons on a background thread

no?

pashute avatar Jun 05 '18 01:06 pashute

I need it to run in background thread :/

My main thread: profiling mantencion

Gloix avatar Jun 15 '18 16:06 Gloix

This thread explains the issue nicely.

The solution to get rid of this warning is probably to add:

+ (BOOL)requiresMainQueueSetup
{
    return NO;
}

andrekovac avatar May 29 '19 09:05 andrekovac