浏览代码

[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.
master
Saúl Ibarra Corretgé 7 年前
父节点
当前提交
90d2340609
共有 2 个文件被更改,包括 8 次插入0 次删除
  1. 4
    0
      ios/sdk/src/AppInfo.m
  2. 4
    0
      ios/sdk/src/AudioMode.m

+ 4
- 0
ios/sdk/src/AppInfo.m 查看文件

@@ -26,6 +26,10 @@
26 26
 
27 27
 RCT_EXPORT_MODULE();
28 28
 
29
++ (BOOL)requiresMainQueueSetup {
30
+    return NO;
31
+}
32
+
29 33
 - (NSDictionary *)constantsToExport {
30 34
     NSDictionary<NSString *, id> *infoDictionary
31 35
         = [[NSBundle mainBundle] infoDictionary];

+ 4
- 0
ios/sdk/src/AudioMode.m 查看文件

@@ -35,6 +35,10 @@ typedef enum {
35 35
     kAudioModeVideoCall
36 36
 } JitsiMeetAudioMode;
37 37
 
38
++ (BOOL)requiresMainQueueSetup {
39
+    return NO;
40
+}
41
+
38 42
 - (NSDictionary *)constantsToExport {
39 43
     return @{
40 44
         @"AUDIO_CALL" : [NSNumber numberWithInt: kAudioModeAudioCall],

正在加载...
取消
保存