You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2015/05/30 01:13:00 UTC
cordova-plugins git commit: Fix compilation error of wkwebview-engine
when DEBUG macro is defined.
Repository: cordova-plugins
Updated Branches:
refs/heads/master f53de1cac -> bf4898899
Fix compilation error of wkwebview-engine when DEBUG macro is defined.
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugins/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugins/commit/bf489889
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugins/tree/bf489889
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugins/diff/bf489889
Branch: refs/heads/master
Commit: bf48988994dae74ebe13ebd96b2aebee7ea2753b
Parents: f53de1c
Author: Shazron Abdullah <sh...@apache.org>
Authored: Fri May 29 16:14:24 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Fri May 29 16:14:24 2015 -0700
----------------------------------------------------------------------
wkwebview-engine/src/ios/CDVWKWebViewEngine.m | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugins/blob/bf489889/wkwebview-engine/src/ios/CDVWKWebViewEngine.m
----------------------------------------------------------------------
diff --git a/wkwebview-engine/src/ios/CDVWKWebViewEngine.m b/wkwebview-engine/src/ios/CDVWKWebViewEngine.m
index d7c2d78..fa0ce26 100644
--- a/wkwebview-engine/src/ios/CDVWKWebViewEngine.m
+++ b/wkwebview-engine/src/ios/CDVWKWebViewEngine.m
@@ -205,13 +205,22 @@
if (![vc.commandQueue execute:command]) {
#ifdef DEBUG
- NSString* commandJson = [jsonEntry JSONString];
+ NSError* error = nil;
+ NSString* commandJson = nil;
+ NSData* jsonData = [NSJSONSerialization dataWithJSONObject:jsonEntry
+ options:0
+ error:&error];
+
+ if (error == nil) {
+ commandJson = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
+ }
+
static NSUInteger maxLogLength = 1024;
NSString* commandString = ([commandJson length] > maxLogLength) ?
[NSString stringWithFormat : @"%@[...]", [commandJson substringToIndex:maxLogLength]] :
commandJson;
- DLog(@"FAILED pluginJSON = %@", commandString);
+ NSLog(@"FAILED pluginJSON = %@", commandString);
#endif
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org