Explorar el Código

run on main thread

Yonah Forst hace 9 años
padre
commit
040352cee0
Se han modificado 1 ficheros con 6 adiciones y 14 borrados
  1. 6 14
      ReactNativePermissions.m

+ 6 - 14
ReactNativePermissions.m

@@ -45,20 +45,12 @@ RCT_EXPORT_MODULE();
     return self;
 }
 
-- (NSDictionary *)constantsToExport
-{
-    return @{ @"PermissionTypes" : @[ @"location",
-                                      @"camera",
-                                      @"microphone",
-                                      @"photo",
-                                      @"contacts",
-                                      @"event",
-                                      @"reminder",
-                                      @"bluetooth",
-                                      @"notification",
-                                      @"backgroundRefresh" ]
-              };
-};
+/**
+ * run on the main queue.
+ */
+- (dispatch_queue_t)methodQueue {
+    return dispatch_get_main_queue();
+}
 
 
 RCT_REMAP_METHOD(canOpenSettings, canOpenSettings:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)