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 2013/03/29 01:17:07 UTC
[1/2] ios commit: [CB-2587] Added plugin timing for plugins that are
loaded on startup (plugin 'onload' attribute)
Updated Branches:
refs/heads/master cb8e66cf4 -> bd48a6b4f
[CB-2587] Added plugin timing for plugins that are loaded on startup (plugin 'onload' attribute)
Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/5addd3df
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/5addd3df
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/5addd3df
Branch: refs/heads/master
Commit: 5addd3df8d35ee3af41cdcc0d16969af2fe3c2f7
Parents: cb8e66c
Author: Shazron Abdullah <sh...@apache.org>
Authored: Thu Mar 28 17:16:00 2013 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Thu Mar 28 17:16:00 2013 -0700
----------------------------------------------------------------------
CordovaLib/Classes/CDV.h | 1 +
CordovaLib/Classes/CDVTimer.h | 28 ++++
CordovaLib/Classes/CDVTimer.m | 127 ++++++++++++++++++
CordovaLib/Classes/CDVViewController.m | 12 ++-
CordovaLib/CordovaLib.xcodeproj/project.pbxproj | 8 +
5 files changed, 173 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5addd3df/CordovaLib/Classes/CDV.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDV.h b/CordovaLib/Classes/CDV.h
index 5a0ae6a..b92d16f 100644
--- a/CordovaLib/Classes/CDV.h
+++ b/CordovaLib/Classes/CDV.h
@@ -47,6 +47,7 @@
#import "CDVLocalStorage.h"
#import "CDVInAppBrowser.h"
#import "CDVScreenOrientationDelegate.h"
+#import "CDVTimer.h"
#import "NSArray+Comparisons.h"
#import "NSData+Base64.h"
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5addd3df/CordovaLib/Classes/CDVTimer.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVTimer.h b/CordovaLib/Classes/CDVTimer.h
new file mode 100644
index 0000000..628d423
--- /dev/null
+++ b/CordovaLib/Classes/CDVTimer.h
@@ -0,0 +1,28 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import <Foundation/Foundation.h>
+
+@interface CDVTimer : NSObject
+
++ (void) start:(NSString*)name;
++ (void) stop:(NSString*)name;
+
+
+@end
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5addd3df/CordovaLib/Classes/CDVTimer.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVTimer.m b/CordovaLib/Classes/CDVTimer.m
new file mode 100644
index 0000000..e42c1c6
--- /dev/null
+++ b/CordovaLib/Classes/CDVTimer.m
@@ -0,0 +1,127 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+
+#import "CDVTimer.h"
+
+
+#pragma mark CDVTimerItem
+
+@interface CDVTimerItem : NSObject
+
+@property (nonatomic, strong) NSString* name;
+@property (nonatomic, strong) NSDate* started;
+@property (nonatomic, strong) NSDate* ended;
+
+- (void) log;
+
+@end
+
+@implementation CDVTimerItem
+
+- (void) log
+{
+ NSLog(@"[CDVTimer][%@] %fms", self.name, [self.ended timeIntervalSinceDate:self.started] * 1000.0);
+}
+
+@end
+
+
+#pragma mark CDVTimer
+
+@interface CDVTimer ()
+
+@property (nonatomic, strong) NSMutableDictionary* items;
+
+@end
+
+@implementation CDVTimer
+
+#pragma mark object methods
+
+- (id) init
+{
+ if (self = [super init]) {
+ self.items = [NSMutableDictionary dictionaryWithCapacity:6];
+ }
+
+ return self;
+}
+
+- (void) add:(NSString*)name
+{
+ if ([self.items objectForKey:[name lowercaseString]] == nil) {
+ CDVTimerItem* item = [CDVTimerItem new];
+ item.name = name;
+ item.started = [NSDate new];
+ [self.items setObject:item forKey:[name lowercaseString]];
+ } else {
+ NSLog(@"Timer called '%@' already exists.", name);
+ }
+}
+
+- (void) remove:(NSString*)name
+{
+ CDVTimerItem* item = [self.items objectForKey:[name lowercaseString]];
+
+ if (item != nil) {
+ item.ended = [NSDate new];
+ [item log];
+ [self.items removeObjectForKey:[name lowercaseString]];
+ } else {
+ NSLog(@"Timer called '%@' does not exist.", name);
+ }
+}
+
+- (void) removeAll
+{
+ [self.items removeAllObjects];
+}
+
+
+#pragma mark class methods
+
++ (void) start:(NSString*)name
+{
+ [[CDVTimer sharedInstance] add:name];
+}
+
++ (void) stop:(NSString*)name
+{
+ [[CDVTimer sharedInstance] remove:name];
+}
+
++ (void) clearAll
+{
+ [[CDVTimer sharedInstance] removeAll];
+}
+
++ (CDVTimer*) sharedInstance
+{
+ static dispatch_once_t pred = 0;
+ __strong static CDVTimer* _sharedObject = nil;
+
+ dispatch_once(&pred, ^{
+ _sharedObject = [[self alloc] init];
+ });
+
+ return _sharedObject;
+}
+
+
+@end
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5addd3df/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m
index c7ad01b..1eab52a 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.m
@@ -367,9 +367,15 @@
[self.webView setValue:[NSNumber numberWithBool:suppressesIncrementalRendering] forKey:@"suppressesIncrementalRendering"];
}
}
-
- for (NSString* pluginName in self.startupPluginNames) {
- [self getCommandInstance:pluginName];
+
+ if ([self.startupPluginNames count] > 0) {
+ [CDVTimer start:@"TotalPluginStartup"];
+ for (NSString* pluginName in self.startupPluginNames) {
+ [CDVTimer start:pluginName];
+ [self getCommandInstance:pluginName];
+ [CDVTimer stop:pluginName];
+ }
+ [CDVTimer stop:@"TotalPluginStartup"];
}
// TODO: Remove this explicit instantiation once we move to cordova-CLI.
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/5addd3df/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
index e14f1f6..2a4efcc 100644
--- a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
+++ b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
@@ -47,6 +47,8 @@
68B7516E16FD18190076A8B4 /* CDVJpegHeaderWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 68B7516B16FD18190076A8B4 /* CDVJpegHeaderWriter.h */; settings = {ATTRIBUTES = (Public, ); }; };
68B7516F16FD18190076A8B4 /* CDVJpegHeaderWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 68B7516C16FD18190076A8B4 /* CDVJpegHeaderWriter.m */; };
68B7517016FD19F80076A8B4 /* CDVExif.h in Headers */ = {isa = PBXBuildFile; fileRef = 68B7516A16FD18190076A8B4 /* CDVExif.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 7E14B5A81705050A0032169E /* CDVTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E14B5A61705050A0032169E /* CDVTimer.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 7E14B5A91705050A0032169E /* CDVTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E14B5A71705050A0032169E /* CDVTimer.m */; };
8852C43A14B65FD800F0E735 /* CDVViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 8852C43614B65FD800F0E735 /* CDVViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
8852C43C14B65FD800F0E735 /* CDVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8852C43714B65FD800F0E735 /* CDVViewController.m */; };
8887FD661090FBE7009987E8 /* CDVCamera.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD261090FBE7009987E8 /* CDVCamera.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -147,6 +149,8 @@
68B7516A16FD18190076A8B4 /* CDVExif.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVExif.h; path = Classes/CDVExif.h; sourceTree = "<group>"; };
68B7516B16FD18190076A8B4 /* CDVJpegHeaderWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVJpegHeaderWriter.h; path = Classes/CDVJpegHeaderWriter.h; sourceTree = "<group>"; };
68B7516C16FD18190076A8B4 /* CDVJpegHeaderWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVJpegHeaderWriter.m; path = Classes/CDVJpegHeaderWriter.m; sourceTree = "<group>"; };
+ 7E14B5A61705050A0032169E /* CDVTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVTimer.h; path = Classes/CDVTimer.h; sourceTree = "<group>"; };
+ 7E14B5A71705050A0032169E /* CDVTimer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVTimer.m; path = Classes/CDVTimer.m; sourceTree = "<group>"; };
8220B5C316D5427E00EC3921 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; };
8852C43614B65FD800F0E735 /* CDVViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVViewController.h; path = Classes/CDVViewController.h; sourceTree = "<group>"; };
8852C43714B65FD800F0E735 /* CDVViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVViewController.m; path = Classes/CDVViewController.m; sourceTree = "<group>"; };
@@ -354,6 +358,8 @@
30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */,
8887FD501090FBE7009987E8 /* NSData+Base64.h */,
8887FD511090FBE7009987E8 /* NSData+Base64.m */,
+ 7E14B5A61705050A0032169E /* CDVTimer.h */,
+ 7E14B5A71705050A0032169E /* CDVTimer.m */,
);
name = Util;
sourceTree = "<group>";
@@ -420,6 +426,7 @@
30F3930B169F839700B22307 /* CDVJSON.h in Headers */,
EBFF4DBD16D3FE2E008F452B /* CDVWebViewDelegate.h in Headers */,
EB96673B16A8970A00D86CDF /* CDVUserAgentUtil.h in Headers */,
+ 7E14B5A81705050A0032169E /* CDVTimer.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -516,6 +523,7 @@
EB96673C16A8970A00D86CDF /* CDVUserAgentUtil.m in Sources */,
EBFF4DBC16D3FE2E008F452B /* CDVWebViewDelegate.m in Sources */,
68B7516F16FD18190076A8B4 /* CDVJpegHeaderWriter.m in Sources */,
+ 7E14B5A91705050A0032169E /* CDVTimer.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
[2/2] ios commit: Style fixups (uncrustify 0.6.0)
Posted by sh...@apache.org.
Style fixups (uncrustify 0.6.0)
Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/bd48a6b4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/bd48a6b4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/bd48a6b4
Branch: refs/heads/master
Commit: bd48a6b4fa907a976234f7da0e34dc8c65c92c08
Parents: 5addd3d
Author: Shazron Abdullah <sh...@apache.org>
Authored: Thu Mar 28 17:17:02 2013 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Thu Mar 28 17:17:02 2013 -0700
----------------------------------------------------------------------
CordovaLib/Classes/CDVTimer.h | 9 ++---
CordovaLib/Classes/CDVTimer.m | 40 +++++++++++-------------
CordovaLib/Classes/CDVViewController.m | 44 ++++++++++++++-------------
3 files changed, 45 insertions(+), 48 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/bd48a6b4/CordovaLib/Classes/CDVTimer.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVTimer.h b/CordovaLib/Classes/CDVTimer.h
index 628d423..6d31593 100644
--- a/CordovaLib/Classes/CDVTimer.h
+++ b/CordovaLib/Classes/CDVTimer.h
@@ -6,9 +6,9 @@
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
-
+
http://www.apache.org/licenses/LICENSE-2.0
-
+
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -21,8 +21,7 @@
@interface CDVTimer : NSObject
-+ (void) start:(NSString*)name;
-+ (void) stop:(NSString*)name;
-
++ (void)start:(NSString*)name;
++ (void)stop:(NSString*)name;
@end
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/bd48a6b4/CordovaLib/Classes/CDVTimer.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVTimer.m b/CordovaLib/Classes/CDVTimer.m
index e42c1c6..784e94d 100644
--- a/CordovaLib/Classes/CDVTimer.m
+++ b/CordovaLib/Classes/CDVTimer.m
@@ -6,9 +6,9 @@
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
-
+
http://www.apache.org/licenses/LICENSE-2.0
-
+
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -19,7 +19,6 @@
#import "CDVTimer.h"
-
#pragma mark CDVTimerItem
@interface CDVTimerItem : NSObject
@@ -28,20 +27,19 @@
@property (nonatomic, strong) NSDate* started;
@property (nonatomic, strong) NSDate* ended;
-- (void) log;
+- (void)log;
@end
@implementation CDVTimerItem
-- (void) log
+- (void)log
{
NSLog(@"[CDVTimer][%@] %fms", self.name, [self.ended timeIntervalSinceDate:self.started] * 1000.0);
}
@end
-
#pragma mark CDVTimer
@interface CDVTimer ()
@@ -54,16 +52,16 @@
#pragma mark object methods
-- (id) init
+- (id)init
{
if (self = [super init]) {
self.items = [NSMutableDictionary dictionaryWithCapacity:6];
}
-
+
return self;
}
-- (void) add:(NSString*)name
+- (void)add:(NSString*)name
{
if ([self.items objectForKey:[name lowercaseString]] == nil) {
CDVTimerItem* item = [CDVTimerItem new];
@@ -75,10 +73,10 @@
}
}
-- (void) remove:(NSString*)name
+- (void)remove:(NSString*)name
{
CDVTimerItem* item = [self.items objectForKey:[name lowercaseString]];
-
+
if (item != nil) {
item.ended = [NSDate new];
[item log];
@@ -88,40 +86,38 @@
}
}
-- (void) removeAll
+- (void)removeAll
{
[self.items removeAllObjects];
}
-
#pragma mark class methods
-+ (void) start:(NSString*)name
++ (void)start:(NSString*)name
{
[[CDVTimer sharedInstance] add:name];
}
-+ (void) stop:(NSString*)name
++ (void)stop:(NSString*)name
{
[[CDVTimer sharedInstance] remove:name];
}
-+ (void) clearAll
++ (void)clearAll
{
[[CDVTimer sharedInstance] removeAll];
}
-+ (CDVTimer*) sharedInstance
++ (CDVTimer*)sharedInstance
{
static dispatch_once_t pred = 0;
__strong static CDVTimer* _sharedObject = nil;
-
+
dispatch_once(&pred, ^{
- _sharedObject = [[self alloc] init];
- });
-
+ _sharedObject = [[self alloc] init];
+ });
+
return _sharedObject;
}
-
@end
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/bd48a6b4/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m
index 1eab52a..459ef87 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.m
@@ -128,7 +128,7 @@
- (void)keyboardWillShowOrHide:(NSNotification*)notif
{
- if (![@"true" isEqualToString:self.settings[@"KeyboardShrinksView"]]) {
+ if (![@"true" isEqualToString : self.settings[@"KeyboardShrinksView"]]) {
return;
}
BOOL showEvent = [notif.name isEqualToString:UIKeyboardWillShowNotification];
@@ -290,18 +290,18 @@
[[NSNotificationCenter defaultCenter] addObserverForName:UIKeyboardWillShowNotification
object:nil
queue:[NSOperationQueue mainQueue]
- usingBlock:^(NSNotification * notification) {
- // we can't hide it here because the accessory bar hasn't been created yet, so we delay on the queue
- [weakSelf performSelector:@selector(hideKeyboardFormAccessoryBar) withObject:nil afterDelay:0];
- }];
+ usingBlock:^(NSNotification* notification) {
+ // we can't hide it here because the accessory bar hasn't been created yet, so we delay on the queue
+ [weakSelf performSelector:@selector(hideKeyboardFormAccessoryBar) withObject:nil afterDelay:0];
+ }];
}
/*
* Fire up CDVLocalStorage to work-around WebKit storage limitations: on all iOS 5.1+ versions for local-only backups, but only needed on iOS 5.1 for cloud backup.
*/
- if (IsAtLeastiOSVersion (@"5.1") && (([backupWebStorageType isEqualToString:@"local"]) ||
- ([backupWebStorageType isEqualToString:@"cloud"] && !IsAtLeastiOSVersion (@"6.0")))) {
- [self registerPlugin:[[CDVLocalStorage alloc] initWithWebView:self.webView] withClassName:NSStringFromClass ([CDVLocalStorage class])];
+ if (IsAtLeastiOSVersion(@"5.1") && (([backupWebStorageType isEqualToString:@"local"]) ||
+ ([backupWebStorageType isEqualToString:@"cloud"] && !IsAtLeastiOSVersion(@"6.0")))) {
+ [self registerPlugin:[[CDVLocalStorage alloc] initWithWebView:self.webView] withClassName:NSStringFromClass([CDVLocalStorage class])];
}
/*
@@ -342,7 +342,7 @@
/*
* iOS 6.0 UIWebView properties
*/
- if (IsAtLeastiOSVersion (@"6.0")) {
+ if (IsAtLeastiOSVersion(@"6.0")) {
BOOL keyboardDisplayRequiresUserAction = YES; // KeyboardDisplayRequiresUserAction - defaults to YES
if ([self.settings objectForKey:@"KeyboardDisplayRequiresUserAction"] != nil) {
if ([self.settings objectForKey:@"KeyboardDisplayRequiresUserAction"]) {
@@ -367,14 +367,16 @@
[self.webView setValue:[NSNumber numberWithBool:suppressesIncrementalRendering] forKey:@"suppressesIncrementalRendering"];
}
}
-
+
if ([self.startupPluginNames count] > 0) {
[CDVTimer start:@"TotalPluginStartup"];
+
for (NSString* pluginName in self.startupPluginNames) {
[CDVTimer start:pluginName];
[self getCommandInstance:pluginName];
[CDVTimer stop:pluginName];
}
+
[CDVTimer stop:@"TotalPluginStartup"];
}
@@ -385,16 +387,16 @@
// /////////////////
[CDVUserAgentUtil acquireLock:^(NSInteger lockToken) {
- _userAgentLockToken = lockToken;
- [CDVUserAgentUtil setUserAgent:self.userAgent lockToken:lockToken];
- if (!loadErr) {
- NSURLRequest* appReq = [NSURLRequest requestWithURL:appURL cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:20.0];
- [self.webView loadRequest:appReq];
- } else {
- NSString* html = [NSString stringWithFormat:@"<html><body> %@ </body></html>", loadErr];
- [self.webView loadHTMLString:html baseURL:nil];
- }
- }];
+ _userAgentLockToken = lockToken;
+ [CDVUserAgentUtil setUserAgent:self.userAgent lockToken:lockToken];
+ if (!loadErr) {
+ NSURLRequest* appReq = [NSURLRequest requestWithURL:appURL cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:20.0];
+ [self.webView loadRequest:appReq];
+ } else {
+ NSString* html = [NSString stringWithFormat:@"<html><body> %@ </body></html>", loadErr];
+ [self.webView loadHTMLString:html baseURL:nil];
+ }
+ }];
}
- (void)hideKeyboardFormAccessoryBar
@@ -789,7 +791,7 @@
id obj = [self.pluginObjects objectForKey:className];
if (!obj) {
- obj = [[NSClassFromString (className)alloc] initWithWebView:webView];
+ obj = [[NSClassFromString(className)alloc] initWithWebView:webView];
if (obj != nil) {
[self registerPlugin:obj withClassName:className];