From 8c81bd47bbe3ed65a55a2c5fd376bfd726bd6777 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Wed, 10 Jul 2013 15:17:41 +0100 Subject: upgrade iOS to phonegap 2.9 --- iPhone/CordovaLib/Classes/CDVCommandQueue.m | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'iPhone/CordovaLib/Classes/CDVCommandQueue.m') diff --git a/iPhone/CordovaLib/Classes/CDVCommandQueue.m b/iPhone/CordovaLib/Classes/CDVCommandQueue.m index a8a58b7..1a0dfa0 100755 --- a/iPhone/CordovaLib/Classes/CDVCommandQueue.m +++ b/iPhone/CordovaLib/Classes/CDVCommandQueue.m @@ -23,6 +23,14 @@ #import "CDVViewController.h" #import "CDVCommandDelegateImpl.h" +@interface CDVCommandQueue () { + NSInteger _lastCommandQueueFlushRequestId; + __weak CDVViewController* _viewController; + NSMutableArray* _queue; + BOOL _currentlyExecuting; +} +@end + @implementation CDVCommandQueue @synthesize currentlyExecuting = _currentlyExecuting; @@ -74,6 +82,9 @@ @"cordova.require('cordova/exec').nativeFetchMessages()"]; [self enqueCommandBatch:queuedCommandsJSON]; + if ([queuedCommandsJSON length] > 0) { + CDV_EXEC_LOG(@"Exec: Retrieved new exec messages by request."); + } } - (void)executePending @@ -92,13 +103,15 @@ // Iterate over and execute all of the commands. for (NSArray* jsonEntry in commandBatch) { CDVInvokedUrlCommand* command = [CDVInvokedUrlCommand commandFromJson:jsonEntry]; + CDV_EXEC_LOG(@"Exec(%@): Calling %@.%@", command.callbackId, command.className, command.methodName); + if (![self execute:command]) { #ifdef DEBUG NSString* commandJson = [jsonEntry JSONString]; static NSUInteger maxLogLength = 1024; NSString* commandString = ([commandJson length] > maxLogLength) ? - [NSString stringWithFormat:@"%@[...]", [commandJson substringToIndex:maxLogLength]] : - commandJson; + [NSString stringWithFormat:@"%@[...]", [commandJson substringToIndex:maxLogLength]] : + commandJson; DLog(@"FAILED pluginJSON = %@", commandString); #endif -- cgit v1.2.3