瀏覽代碼

run on main thread

Yonah Forst 8 年之前
父節點
當前提交
040352cee0
共有 1 個文件被更改,包括 6 次插入14 次删除
  1. 6
    14
      ReactNativePermissions.m

+ 6
- 14
ReactNativePermissions.m 查看文件

@@ -45,20 +45,12 @@ RCT_EXPORT_MODULE();
45 45
     return self;
46 46
 }
47 47
 
48
-- (NSDictionary *)constantsToExport
49
-{
50
-    return @{ @"PermissionTypes" : @[ @"location",
51
-                                      @"camera",
52
-                                      @"microphone",
53
-                                      @"photo",
54
-                                      @"contacts",
55
-                                      @"event",
56
-                                      @"reminder",
57
-                                      @"bluetooth",
58
-                                      @"notification",
59
-                                      @"backgroundRefresh" ]
60
-              };
61
-};
48
+/**
49
+ * run on the main queue.
50
+ */
51
+- (dispatch_queue_t)methodQueue {
52
+    return dispatch_get_main_queue();
53
+}
62 54
 
63 55
 
64 56
 RCT_REMAP_METHOD(canOpenSettings, canOpenSettings:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)