Преглед на файлове

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

+ 4
- 0
ios/sdk/src/AudioMode.m Целия файл

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

Loading…
Отказ
Запис