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/01/11 00:02:04 UTC
ios commit: [CB-1832] iOS: CDVCordovaView should not inherit from
UIWebView
Updated Branches:
refs/heads/master a484850f4 -> b4a2e4ae0
[CB-1832] iOS: CDVCordovaView should not inherit from UIWebView
Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/b4a2e4ae
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/b4a2e4ae
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/b4a2e4ae
Branch: refs/heads/master
Commit: b4a2e4ae0445ba7aec788090dce9b822d67edfd8
Parents: a484850
Author: Shazron Abdullah <sh...@apache.org>
Authored: Thu Jan 10 15:01:57 2013 -0800
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Thu Jan 10 15:01:57 2013 -0800
----------------------------------------------------------------------
CordovaLib/Classes/CDV.h | 1 -
CordovaLib/Classes/CDVCordovaView.h | 23 ---------
CordovaLib/Classes/CDVCordovaView.m | 37 ---------------
CordovaLib/Classes/CDVViewController.h | 7 +--
CordovaLib/Classes/CDVViewController.m | 4 +-
CordovaLib/CordovaLib.xcodeproj/project.pbxproj | 8 ---
.../__TESTING__/Classes/MainViewController.m | 2 +-
7 files changed, 6 insertions(+), 76 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/b4a2e4ae/CordovaLib/Classes/CDV.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDV.h b/CordovaLib/Classes/CDV.h
index 5367799..6474cfe 100644
--- a/CordovaLib/Classes/CDV.h
+++ b/CordovaLib/Classes/CDV.h
@@ -32,7 +32,6 @@
#import "CDVConnection.h"
#import "CDVContact.h"
#import "CDVContacts.h"
-#import "CDVCordovaView.h"
#import "CDVDebug.h"
#import "CDVDebugConsole.h"
#import "CDVDevice.h"
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/b4a2e4ae/CordovaLib/Classes/CDVCordovaView.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVCordovaView.h b/CordovaLib/Classes/CDVCordovaView.h
deleted file mode 100644
index 6318b21..0000000
--- a/CordovaLib/Classes/CDVCordovaView.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- 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 <UIKit/UIKit.h>
-
-@interface CDVCordovaView : UIWebView {}
-@end
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/b4a2e4ae/CordovaLib/Classes/CDVCordovaView.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVCordovaView.m b/CordovaLib/Classes/CDVCordovaView.m
deleted file mode 100644
index 3dff80a..0000000
--- a/CordovaLib/Classes/CDVCordovaView.m
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- 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 "CDVCordovaView.h"
-
-@implementation CDVCordovaView
-
-- (void)loadRequest:(NSURLRequest*)request
-{
- [super loadRequest:request];
-}
-
-/*
-// Only override drawRect: if you perform custom drawing.
-// An empty implementation adversely affects performance during animation.
-- (void)drawRect:(CGRect)rect {
- // Drawing code.
-}
-*/
-
-@end
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/b4a2e4ae/CordovaLib/Classes/CDVViewController.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.h b/CordovaLib/Classes/CDVViewController.h
index 7585733..5c1a814 100644
--- a/CordovaLib/Classes/CDVViewController.h
+++ b/CordovaLib/Classes/CDVViewController.h
@@ -17,8 +17,7 @@
under the License.
*/
-#import "CDVCordovaView.h"
-
+#import <UIKit/UIKit.h>
#import "JSONKit.h"
#import "CDVAvailability.h"
#import "CDVInvokedUrlCommand.h"
@@ -37,7 +36,7 @@
NSString* _userAgent;
}
-@property (nonatomic, strong) IBOutlet CDVCordovaView* webView;
+@property (nonatomic, strong) IBOutlet UIWebView* webView;
@property (nonatomic, readonly, strong) NSMutableDictionary* pluginObjects;
@property (nonatomic, readonly, strong) NSDictionary* pluginsMap;
@@ -62,7 +61,7 @@
- (void)printMultitaskingInfo;
- (void)createGapView;
-- (CDVCordovaView*)newCordovaViewWithFrame:(CGRect)bounds;
+- (UIWebView*)newCordovaViewWithFrame:(CGRect)bounds;
- (void)javascriptAlert:(NSString*)text;
- (NSString*)appURLScheme;
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/b4a2e4ae/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m
index d27211e..bae4089 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.m
@@ -409,9 +409,9 @@ static NSString* gOriginalUserAgent = nil;
return [self.supportedOrientations containsObject:[NSNumber numberWithInt:orientation]];
}
-- (CDVCordovaView*)newCordovaViewWithFrame:(CGRect)bounds
+- (UIWebView*)newCordovaViewWithFrame:(CGRect)bounds
{
- return [[CDVCordovaView alloc] initWithFrame:bounds];
+ return [[UIWebView alloc] initWithFrame:bounds];
}
+ (NSString*)originalUserAgent
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/b4a2e4ae/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
index 1bb7fa7..de5f65b 100644
--- a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
+++ b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
@@ -46,8 +46,6 @@
3E76876F156A90EE00EB6FA3 /* CDVLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E76876C156A90EE00EB6FA3 /* CDVLogger.h */; settings = {ATTRIBUTES = (Public, ); }; };
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 */; };
- 8852C43F14B65FD800F0E735 /* CDVCordovaView.h in Headers */ = {isa = PBXBuildFile; fileRef = 8852C43814B65FD800F0E735 /* CDVCordovaView.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 8852C44114B65FD800F0E735 /* CDVCordovaView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8852C43914B65FD800F0E735 /* CDVCordovaView.m */; };
8887FD661090FBE7009987E8 /* CDVCamera.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD261090FBE7009987E8 /* CDVCamera.h */; settings = {ATTRIBUTES = (Public, ); }; };
8887FD671090FBE7009987E8 /* CDVCamera.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD271090FBE7009987E8 /* CDVCamera.m */; };
8887FD681090FBE7009987E8 /* NSDictionary+Extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -141,8 +139,6 @@
68A32D7414103017006B237C /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.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>"; };
- 8852C43814B65FD800F0E735 /* CDVCordovaView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCordovaView.h; path = Classes/CDVCordovaView.h; sourceTree = "<group>"; };
- 8852C43914B65FD800F0E735 /* CDVCordovaView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCordovaView.m; path = Classes/CDVCordovaView.m; sourceTree = "<group>"; };
8887FD261090FBE7009987E8 /* CDVCamera.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCamera.h; path = Classes/CDVCamera.h; sourceTree = "<group>"; };
8887FD271090FBE7009987E8 /* CDVCamera.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCamera.m; path = Classes/CDVCamera.m; sourceTree = "<group>"; };
8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+Extensions.h"; path = "Classes/NSDictionary+Extensions.h"; sourceTree = "<group>"; };
@@ -240,8 +236,6 @@
F858FBC5166009A8007DA594 /* CDVConfigParser.m */,
8852C43614B65FD800F0E735 /* CDVViewController.h */,
8852C43714B65FD800F0E735 /* CDVViewController.m */,
- 8852C43814B65FD800F0E735 /* CDVCordovaView.h */,
- 8852C43914B65FD800F0E735 /* CDVCordovaView.m */,
EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */,
EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */,
);
@@ -393,7 +387,6 @@
30C684941407044B004C1A8E /* CDVURLProtocol.h in Headers */,
30A90B9114588697006178D3 /* JSONKit.h in Headers */,
8852C43A14B65FD800F0E735 /* CDVViewController.h in Headers */,
- 8852C43F14B65FD800F0E735 /* CDVCordovaView.h in Headers */,
30F5EBAB14CA26E700987760 /* CDVCommandDelegate.h in Headers */,
301F2F2A14F3C9CA003FE9FC /* CDV.h in Headers */,
30392E4E14F4FCAB00B9E0B8 /* CDVAvailability.h in Headers */,
@@ -491,7 +484,6 @@
30C684961407044B004C1A8E /* CDVURLProtocol.m in Sources */,
30A90B9314588697006178D3 /* JSONKit.m in Sources */,
8852C43C14B65FD800F0E735 /* CDVViewController.m in Sources */,
- 8852C44114B65FD800F0E735 /* CDVCordovaView.m in Sources */,
3034979E1513D56A0090E688 /* CDVLocalStorage.m in Sources */,
3062D122151D0EDB000D9128 /* UIDevice+Extensions.m in Sources */,
3E76876D156A90EE00EB6FA3 /* CDVLogger.m in Sources */,
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/b4a2e4ae/bin/templates/project/__TESTING__/Classes/MainViewController.m
----------------------------------------------------------------------
diff --git a/bin/templates/project/__TESTING__/Classes/MainViewController.m b/bin/templates/project/__TESTING__/Classes/MainViewController.m
index 89da108..5f9eeac 100644
--- a/bin/templates/project/__TESTING__/Classes/MainViewController.m
+++ b/bin/templates/project/__TESTING__/Classes/MainViewController.m
@@ -93,7 +93,7 @@
/* Comment out the block below to over-ride */
/*
-- (CDVCordovaView*) newCordovaViewWithFrame:(CGRect)bounds
+- (UIWebView*) newCordovaViewWithFrame:(CGRect)bounds
{
return[super newCordovaViewWithFrame:bounds];
}