From 90d2340609fe728aac58c912feee573d72eda07e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Mon, 21 May 2018 12:35:59 +0200 Subject: [PATCH] [iOS] Fix React Native warnings Fixes the following warning: ~~~ Module XXX requires main queue setup since it overrides `constantsToExport` 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. ~~~ For AppInfo and AuioMode, there is no need to initialize anything in the UI thread, so just return NO. --- ios/sdk/src/AppInfo.m | 4 ++++ ios/sdk/src/AudioMode.m | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/ios/sdk/src/AppInfo.m b/ios/sdk/src/AppInfo.m index 6f24fc80c..0b827cfc1 100644 --- a/ios/sdk/src/AppInfo.m +++ b/ios/sdk/src/AppInfo.m @@ -26,6 +26,10 @@ RCT_EXPORT_MODULE(); ++ (BOOL)requiresMainQueueSetup { + return NO; +} + - (NSDictionary *)constantsToExport { NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary]; diff --git a/ios/sdk/src/AudioMode.m b/ios/sdk/src/AudioMode.m index b1598d9e6..e0d3dc752 100644 --- a/ios/sdk/src/AudioMode.m +++ b/ios/sdk/src/AudioMode.m @@ -35,6 +35,10 @@ typedef enum { kAudioModeVideoCall } JitsiMeetAudioMode; ++ (BOOL)requiresMainQueueSetup { + return NO; +} + - (NSDictionary *)constantsToExport { return @{ @"AUDIO_CALL" : [NSNumber numberWithInt: kAudioModeAudioCall],