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 2012/11/27 22:27:48 UTC
ios commit: Renamed references of Cordova.plist to config.xml (plus
uncrustify)
Updated Branches:
refs/heads/master e5b4aafbf -> 3bf30170d
Renamed references of Cordova.plist to config.xml (plus uncrustify)
Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/3bf30170
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/3bf30170
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/3bf30170
Branch: refs/heads/master
Commit: 3bf30170d30cb33fd3b047d789ab6e6d75c56c4a
Parents: e5b4aaf
Author: Shazron Abdullah <sh...@apache.org>
Authored: Tue Nov 27 13:27:45 2012 -0800
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue Nov 27 13:27:45 2012 -0800
----------------------------------------------------------------------
CordovaLib/Classes/CDVCommandDelegate.h | 2 +-
CordovaLib/Classes/CDVCommandQueue.m | 2 +-
CordovaLib/Classes/CDVViewController.m | 11 ++++++-----
3 files changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3bf30170/CordovaLib/Classes/CDVCommandDelegate.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVCommandDelegate.h b/CordovaLib/Classes/CDVCommandDelegate.h
index 8f41071..4a53f98 100644
--- a/CordovaLib/Classes/CDVCommandDelegate.h
+++ b/CordovaLib/Classes/CDVCommandDelegate.h
@@ -27,7 +27,7 @@
- (NSString*)pathForResource:(NSString*)resourcepath;
- (id)getCommandInstance:(NSString*)pluginName;
-- (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className CDV_DEPRECATED(2.2, "Use CDVViewController to register plugins, or use Cordova.plist.");
+- (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className CDV_DEPRECATED(2.2, "Use CDVViewController to register plugins, or use config.xml.");
// Plugins should not be using this interface to call other plugins since it
// will result in bogus callbacks being made.
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3bf30170/CordovaLib/Classes/CDVCommandQueue.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVCommandQueue.m b/CordovaLib/Classes/CDVCommandQueue.m
index e4e6c45..ae6bfa7 100644
--- a/CordovaLib/Classes/CDVCommandQueue.m
+++ b/CordovaLib/Classes/CDVCommandQueue.m
@@ -123,7 +123,7 @@
CDVPlugin* obj = [_viewController getCommandInstance:command.className];
if (!([obj isKindOfClass:[CDVPlugin class]])) {
- NSLog(@"ERROR: Plugin '%@' not found, or is not a CDVPlugin. Check your plugin mapping in Cordova.plist.", command.className);
+ NSLog(@"ERROR: Plugin '%@' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.", command.className);
return NO;
}
BOOL retVal = YES;
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3bf30170/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m
index 33837a5..320391f 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.m
@@ -89,7 +89,7 @@ static NSString* gOriginalUserAgent = nil;
[self printDeprecationNotice];
self.initialized = YES;
- // load Cordova.plist settings
+ // load config.xml settings
[self loadSettings];
}
}
@@ -138,21 +138,22 @@ static NSString* gOriginalUserAgent = nil;
{
CDVConfigParser* delegate = [[CDVConfigParser alloc] init];
- // read from Cordova.plist in the app bundle
+ // read from config.xml in the app bundle
NSString* path = [[NSBundle mainBundle] pathForResource:@"config" ofType:@"xml"];
+
if (![[NSFileManager defaultManager] fileExistsAtPath:path]) {
NSAssert(NO, @"ERROR: config.xml does not exist");
return;
}
- NSURL *url = [NSURL fileURLWithPath:path];
+ NSURL* url = [NSURL fileURLWithPath:path];
configParser = [[NSXMLParser alloc] initWithContentsOfURL:url];
if (configParser == nil) {
NSLog(@"Failed to initialize XML parser.");
return;
}
- [configParser setDelegate:((id<NSXMLParserDelegate>) delegate)];
+ [configParser setDelegate:((id < NSXMLParserDelegate >)delegate)];
[configParser parse];
// Get the plugin dictionary, whitelist and settings from the delegate.
@@ -246,7 +247,7 @@ static NSString* gOriginalUserAgent = nil;
BOOL bounceAllowed = (bouncePreference == nil || [bouncePreference boolValue]);
// prevent webView from bouncing
- // based on UIWebViewBounce key in Cordova.plist
+ // based on UIWebViewBounce key in config.xml
if (!bounceAllowed) {
if ([self.webView respondsToSelector:@selector(scrollView)]) {
((UIScrollView*)[self.webView scrollView]).bounces = NO;