Selaa lähdekoodia

ios: enable proximity sensor on the main thread

Fixes this issue:

Main Thread Checker: UI API called on a background thread: -[UIApplication setExpectsFaceContact:inLandscape:]
PID: 25442, TID: 10886619, Thread name: (none), Queue name: com.facebook.react.ProximityQueue, QoS: 0
Backtrace:
4   JitsiMeet                           0x000000010a0eaadc -[Proximity setEnabled:] + 64
5   CoreFoundation                      0x00000001fea34630 <redacted> + 144
6   CoreFoundation                      0x00000001fe912450 <redacted> + 292
7   CoreFoundation                      0x00000001fe913034 <redacted> + 60
8   JitsiMeet                           0x000000010a4e08e8 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 492
9   JitsiMeet                           0x000000010a4e7a10 _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicE + 248
10  JitsiMeet                           0x000000010a4e776c ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 88
11  libdispatch.dylib                   0x000000010b943824 _dispatch_call_block_and_release + 24
12  libdispatch.dylib                   0x000000010b944dc8 _dispatch_client_callout + 16
13  libdispatch.dylib                   0x000000010b94ce6c _dispatch_lane_serial_drain + 720
14  libdispatch.dylib                   0x000000010b94db60 _dispatch_lane_invoke + 460
15  libdispatch.dylib                   0x000000010b957bfc _dispatch_workloop_worker_thread + 1220
16  libsystem_pthread.dylib             0x00000001fe6490dc _pthread_wqthread + 312
17  libsystem_pthread.dylib             0x00000001fe64bcec start_wqthread + 4
master
Saúl Ibarra Corretgé 6 vuotta sitten
vanhempi
commit
070a34e30d
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 4
    0
      ios/sdk/src/Proximity.m

+ 4
- 0
ios/sdk/src/Proximity.m Näytä tiedosto

@@ -25,6 +25,10 @@
25 25
 
26 26
 RCT_EXPORT_MODULE();
27 27
 
28
+- (dispatch_queue_t)methodQueue {
29
+    return dispatch_get_main_queue();
30
+}
31
+
28 32
 /**
29 33
  * Enables / disables the proximity sensor monitoring. On iOS enabling the
30 34
  * proximity sensor automatically dims the screen and disables touch controls,

Loading…
Peruuta
Tallenna