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/03/17 00:40:17 UTC
ios commit: CB-8678 - Included core plugins should be added through
configuration, not code
Repository: cordova-ios
Updated Branches:
refs/heads/4.0.x 1ffec81e6 -> 98fcf6628
CB-8678 - Included core plugins should be added through configuration, not code
Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/98fcf662
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/98fcf662
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/98fcf662
Branch: refs/heads/4.0.x
Commit: 98fcf66283f634111e323ac23189777d1c49566c
Parents: 1ffec81
Author: Shazron Abdullah <sh...@apache.org>
Authored: Mon Mar 16 16:40:15 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Mon Mar 16 16:40:15 2015 -0700
----------------------------------------------------------------------
CordovaLib/Classes/CDVViewController.m | 9 +++++----
bin/templates/project/__PROJECT_NAME__/config.xml | 4 ++++
tests/CordovaLibTests/CordovaLibApp/config.xml | 4 ++++
3 files changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/98fcf662/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m
index 6f271ce..6b40a84 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.m
@@ -38,7 +38,7 @@
@property (nonatomic, readwrite, strong) NSMutableDictionary* settings;
@property (nonatomic, readwrite, strong) CDVWhitelist* whitelist;
@property (nonatomic, readwrite, strong) NSMutableDictionary* pluginObjects;
-@property (nonatomic, readwrite, strong) NSArray* startupPluginNames;
+@property (nonatomic, readwrite, strong) NSMutableArray* startupPluginNames;
@property (nonatomic, readwrite, strong) NSDictionary* pluginsMap;
@property (nonatomic, readwrite, strong) NSArray* supportedOrientations;
@property (nonatomic, readwrite, assign) BOOL loadFromString;
@@ -297,7 +297,10 @@
With minimum iOS 6/7 supported, only first clause applies.
*/
if ([backupWebStorageType isEqualToString:@"local"]) {
- [self registerPlugin:[[CDVLocalStorage alloc] initWithWebViewEngine:self.webViewEngine] withClassName:NSStringFromClass([CDVLocalStorage class])];
+ NSString* localStorageFeatureName = @"localstorage";
+ if ([self.pluginsMap objectForKey:localStorageFeatureName]) { // plugin specified in config
+ [self.startupPluginNames addObject:localStorageFeatureName];
+ }
}
if ([self.startupPluginNames count] > 0) {
@@ -312,8 +315,6 @@
[CDVTimer stop:@"TotalPluginStartup"];
}
- [self registerPlugin:[[CDVHandleOpenURL alloc] initWithWebViewEngine:self.webViewEngine] withClassName:NSStringFromClass([CDVHandleOpenURL class])];
-
// /////////////////
NSURL* appURL = [self appUrl];
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/98fcf662/bin/templates/project/__PROJECT_NAME__/config.xml
----------------------------------------------------------------------
diff --git a/bin/templates/project/__PROJECT_NAME__/config.xml b/bin/templates/project/__PROJECT_NAME__/config.xml
index 985ae7f..f13f415 100644
--- a/bin/templates/project/__PROJECT_NAME__/config.xml
+++ b/bin/templates/project/__PROJECT_NAME__/config.xml
@@ -63,4 +63,8 @@
<feature name="LocalStorage">
<param name="ios-package" value="CDVLocalStorage"/>
</feature>
+ <feature name="HandleOpenUrl">
+ <param name="ios-package" value="CDVHandleOpenUrl"/>
+ <param name="onload" value="true"/>
+ </feature>
</widget>
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/98fcf662/tests/CordovaLibTests/CordovaLibApp/config.xml
----------------------------------------------------------------------
diff --git a/tests/CordovaLibTests/CordovaLibApp/config.xml b/tests/CordovaLibTests/CordovaLibApp/config.xml
index 149e8fd..30bc139 100644
--- a/tests/CordovaLibTests/CordovaLibApp/config.xml
+++ b/tests/CordovaLibTests/CordovaLibApp/config.xml
@@ -51,4 +51,8 @@
<feature name="LocalStorage">
<param name="ios-package" value="CDVLocalStorage"/>
</feature>
+ <feature name="HandleOpenUrl">
+ <param name="ios-package" value="CDVHandleOpenUrl"/>
+ <param name="onload" value="true"/>
+ </feature>
</widget>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org