[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.
This commit is contained in:
Saúl Ibarra Corretgé 2018-05-21 12:35:59 +02:00
parent d70ca48728
commit 90d2340609
2 changed files with 8 additions and 0 deletions

View File

@ -26,6 +26,10 @@
RCT_EXPORT_MODULE();
+ (BOOL)requiresMainQueueSetup {
return NO;
}
- (NSDictionary *)constantsToExport {
NSDictionary<NSString *, id> *infoDictionary
= [[NSBundle mainBundle] infoDictionary];

View File

@ -35,6 +35,10 @@ typedef enum {
kAudioModeVideoCall
} JitsiMeetAudioMode;
+ (BOOL)requiresMainQueueSetup {
return NO;
}
- (NSDictionary *)constantsToExport {
return @{
@"AUDIO_CALL" : [NSNumber numberWithInt: kAudioModeAudioCall],