瀏覽代碼

Execute ready on iOS async

Sebastián Katzer 8 年之前
父節點
當前提交
91c5f79391
共有 1 個文件被更改,包括 6 次插入5 次删除
  1. 6 5
      src/ios/APPLocalNotification.m

+ 6 - 5
src/ios/APPLocalNotification.m

@@ -72,11 +72,12 @@
 {
     deviceready = YES;
 
-    for (NSString* js in eventQueue) {
-        [self.commandDelegate evalJs:js];
-    }
-
-    [eventQueue removeAllObjects];
+    [self.commandDelegate runInBackground:^{
+        for (NSString* js in eventQueue) {
+            [self.commandDelegate evalJs:js];
+        }
+        [eventQueue removeAllObjects];
+    }];
 }
 
 /**