Forráskód Böngészése

Execute ready on iOS async

Sebastián Katzer 8 éve
szülő
commit
91c5f79391
1 módosított fájl, 6 hozzáadás és 5 törlés
  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];
+    }];
 }
 
 /**