summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/ios/CordovaLib
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-12-03 00:23:09 -0500
committerJules Laplace <jules@okfoc.us>2015-12-03 00:23:09 -0500
commite760f95dc843cf11367d1aea0ed832991964584a (patch)
treecf03b343ef830c58f2b12aa0c76135fca58489c9 /StoneIsland/platforms/ios/CordovaLib
parent0a55602cb98fea35632f8f11e840c65cc9011018 (diff)
rebuild project
Diffstat (limited to 'StoneIsland/platforms/ios/CordovaLib')
-rw-r--r--StoneIsland/platforms/ios/CordovaLib/Classes/CDVAvailability.h5
-rw-r--r--StoneIsland/platforms/ios/CordovaLib/Classes/CDVCommandDelegateImpl.m2
-rw-r--r--StoneIsland/platforms/ios/CordovaLib/Classes/CDVPlugin.h2
-rw-r--r--StoneIsland/platforms/ios/CordovaLib/Classes/CDVViewController.h14
-rw-r--r--StoneIsland/platforms/ios/CordovaLib/Classes/CDVViewController.m30
-rw-r--r--StoneIsland/platforms/ios/CordovaLib/Classes/CDVWebViewDelegate.m6
-rw-r--r--StoneIsland/platforms/ios/CordovaLib/Classes/NSData+Base64.h4
-rw-r--r--StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/CordovaLib.xcscheme77
-rw-r--r--StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/xcschememanagement.plist22
-rw-r--r--StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/CordovaLib.xcscheme77
-rw-r--r--StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist22
-rw-r--r--StoneIsland/platforms/ios/CordovaLib/VERSION2
-rw-r--r--StoneIsland/platforms/ios/CordovaLib/cordova.js224
13 files changed, 235 insertions, 252 deletions
diff --git a/StoneIsland/platforms/ios/CordovaLib/Classes/CDVAvailability.h b/StoneIsland/platforms/ios/CordovaLib/Classes/CDVAvailability.h
index 71e20b97..059152ea 100644
--- a/StoneIsland/platforms/ios/CordovaLib/Classes/CDVAvailability.h
+++ b/StoneIsland/platforms/ios/CordovaLib/Classes/CDVAvailability.h
@@ -55,6 +55,9 @@
#define __CORDOVA_3_6_0 30600
#define __CORDOVA_3_7_0 30700
#define __CORDOVA_3_8_0 30800
+#define __CORDOVA_3_9_0 30900
+#define __CORDOVA_3_9_1 30901
+#define __CORDOVA_3_9_2 30902
#define __CORDOVA_NA 99999 /* not available */
/*
@@ -65,7 +68,7 @@
#endif
*/
#ifndef CORDOVA_VERSION_MIN_REQUIRED
- #define CORDOVA_VERSION_MIN_REQUIRED __CORDOVA_3_8_0
+ #define CORDOVA_VERSION_MIN_REQUIRED __CORDOVA_3_9_2
#endif
/*
diff --git a/StoneIsland/platforms/ios/CordovaLib/Classes/CDVCommandDelegateImpl.m b/StoneIsland/platforms/ios/CordovaLib/Classes/CDVCommandDelegateImpl.m
index 9407e0a8..be7eb63a 100644
--- a/StoneIsland/platforms/ios/CordovaLib/Classes/CDVCommandDelegateImpl.m
+++ b/StoneIsland/platforms/ios/CordovaLib/Classes/CDVCommandDelegateImpl.m
@@ -143,7 +143,7 @@
- (void)evalJs:(NSString*)js scheduledOnRunLoop:(BOOL)scheduledOnRunLoop
{
- js = [NSString stringWithFormat:@"cordova.require('cordova/exec').nativeEvalAndFetch(function(){%@})", js];
+ js = [NSString stringWithFormat:@"try{cordova.require('cordova/exec').nativeEvalAndFetch(function(){%@})}catch(e){console.log('exeption nativeEvalAndFetch : '+e);};", js];
if (scheduledOnRunLoop) {
[self evalJsHelper:js];
} else {
diff --git a/StoneIsland/platforms/ios/CordovaLib/Classes/CDVPlugin.h b/StoneIsland/platforms/ios/CordovaLib/Classes/CDVPlugin.h
index 5e8b2830..c9991e57 100644
--- a/StoneIsland/platforms/ios/CordovaLib/Classes/CDVPlugin.h
+++ b/StoneIsland/platforms/ios/CordovaLib/Classes/CDVPlugin.h
@@ -38,7 +38,7 @@ extern NSString* const CDVRemoteNotificationError;
@property (readonly, assign) BOOL hasPendingOperation;
-- (CDVPlugin*)initWithWebView:(UIWebView*)theWebView;
+- (CDVPlugin*)initWithWebView:(UIWebView*)theWebView CDV_DEPRECATED(3.9.2, "Use pluginInitialize method instead. This will be removed in 4.0.0");
- (void)pluginInitialize;
- (void)handleOpenURL:(NSNotification*)notification;
diff --git a/StoneIsland/platforms/ios/CordovaLib/Classes/CDVViewController.h b/StoneIsland/platforms/ios/CordovaLib/Classes/CDVViewController.h
index 51863a59..ed114049 100644
--- a/StoneIsland/platforms/ios/CordovaLib/Classes/CDVViewController.h
+++ b/StoneIsland/platforms/ios/CordovaLib/Classes/CDVViewController.h
@@ -41,8 +41,8 @@
@property (nonatomic, readonly, strong) NSDictionary* pluginsMap;
@property (nonatomic, readonly, strong) NSMutableDictionary* settings;
@property (nonatomic, readonly, strong) NSXMLParser* configParser;
-@property (nonatomic, readonly, strong) CDVWhitelist* whitelist; // readonly for public
-@property (nonatomic, readonly, assign) BOOL loadFromString;
+@property (nonatomic, readonly, strong) CDVWhitelist* whitelist CDV_DEPRECATED(3.9.2, "Use URLisAllowed to check specific URL. This will be removed in 4.0.0"); // readonly for public
+@property (nonatomic, readonly, assign) BOOL loadFromString CDV_DEPRECATED(3.9.2, "This will be removed in 4.0.0");
@property (nonatomic, readwrite, copy) NSString* wwwFolderName;
@property (nonatomic, readwrite, copy) NSString* startPage;
@@ -61,14 +61,14 @@
*/
@property (nonatomic, readwrite, copy) NSString* baseUserAgent;
-+ (NSDictionary*)getBundlePlist:(NSString*)plistName;
-+ (NSString*)applicationDocumentsDirectory;
++ (NSDictionary*)getBundlePlist:(NSString*)plistName CDV_DEPRECATED(3.9.2, "This will be removed in 4.0.0");
++ (NSString*)applicationDocumentsDirectory CDV_DEPRECATED(3.9.2, "This will be removed in 4.0.0");
-- (void)printMultitaskingInfo;
-- (void)createGapView;
+- (void)printMultitaskingInfo CDV_DEPRECATED(3.9.2, "This will be removed in 4.0.0");
+- (void)createGapView CDV_DEPRECATED(3.9.2, "This will be removed in 4.0.0");
- (UIWebView*)newCordovaViewWithFrame:(CGRect)bounds;
-- (void)javascriptAlert:(NSString*)text;
+- (void)javascriptAlert:(NSString*)text CDV_DEPRECATED(3.9.2, "Use the CDVCommandDelegate evalJs: directly. This will be removed in 4.0.0");
- (NSString*)appURLScheme;
- (NSArray*)parseInterfaceOrientations:(NSArray*)orientations;
diff --git a/StoneIsland/platforms/ios/CordovaLib/Classes/CDVViewController.m b/StoneIsland/platforms/ios/CordovaLib/Classes/CDVViewController.m
index 6d81e8d9..6bfabe42 100644
--- a/StoneIsland/platforms/ios/CordovaLib/Classes/CDVViewController.m
+++ b/StoneIsland/platforms/ios/CordovaLib/Classes/CDVViewController.m
@@ -601,13 +601,22 @@
- (NSString*)userAgent
{
- if (_userAgent == nil) {
- NSString* localBaseUserAgent;
- if (self.baseUserAgent != nil) {
- localBaseUserAgent = self.baseUserAgent;
- } else {
- localBaseUserAgent = [CDVUserAgentUtil originalUserAgent];
- }
+ if (_userAgent != nil) {
+ return _userAgent;
+ }
+
+ NSString* localBaseUserAgent;
+ if (self.baseUserAgent != nil) {
+ localBaseUserAgent = self.baseUserAgent;
+ } else if ([self settingForKey:@"OverrideUserAgent"] != nil) {
+ localBaseUserAgent = [self settingForKey:@"OverrideUserAgent"];
+ } else {
+ localBaseUserAgent = [CDVUserAgentUtil originalUserAgent];
+ }
+ NSString* appendUserAgent = [self settingForKey:@"AppendUserAgent"];
+ if (appendUserAgent) {
+ _userAgent = [NSString stringWithFormat:@"%@ %@", localBaseUserAgent, appendUserAgent];
+ } else {
// Use our address as a unique number to append to the User-Agent.
_userAgent = [NSString stringWithFormat:@"%@ (%lld)", localBaseUserAgent, (long long)self];
}
@@ -980,6 +989,13 @@
{
// NSLog(@"%@",@"applicationWillEnterForeground");
[self.commandDelegate evalJs:@"cordova.fireDocumentEvent('resume');"];
+
+ /** Clipboard fix **/
+ UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
+ NSString *string = pasteboard.string;
+ if (string) {
+ [pasteboard setValue:string forPasteboardType:@"public.text"];
+ }
}
// This method is called to let your application know that it moved from the inactive to active state.
diff --git a/StoneIsland/platforms/ios/CordovaLib/Classes/CDVWebViewDelegate.m b/StoneIsland/platforms/ios/CordovaLib/Classes/CDVWebViewDelegate.m
index 514827e5..a7e29086 100644
--- a/StoneIsland/platforms/ios/CordovaLib/Classes/CDVWebViewDelegate.m
+++ b/StoneIsland/platforms/ios/CordovaLib/Classes/CDVWebViewDelegate.m
@@ -197,7 +197,7 @@ static NSString *stripFragment(NSString* url)
{
NSString* scheme = [[request URL] scheme];
- if ([scheme isEqualToString:@"mailto"] || [scheme isEqualToString:@"tel"]) {
+ if ([scheme isEqualToString:@"mailto"] || [scheme isEqualToString:@"tel"] || [scheme isEqualToString:@"sms"] || [scheme isEqualToString:@"blob"]) {
return YES;
}
@@ -251,10 +251,10 @@ static NSString *stripFragment(NSString* url)
default:
{
- _loadCount = 0;
- _state = STATE_WAITING_FOR_LOAD_START;
NSString* description = [NSString stringWithFormat:@"CDVWebViewDelegate: Navigation started when state=%ld", (long)_state];
NSLog(@"%@", description);
+ _loadCount = 0;
+ _state = STATE_WAITING_FOR_LOAD_START;
if ([_delegate respondsToSelector:@selector(webView:didFailLoadWithError:)]) {
NSDictionary* errorDictionary = @{NSLocalizedDescriptionKey : description};
NSError* error = [[NSError alloc] initWithDomain:@"CDVWebViewDelegate" code:1 userInfo:errorDictionary];
diff --git a/StoneIsland/platforms/ios/CordovaLib/Classes/NSData+Base64.h b/StoneIsland/platforms/ios/CordovaLib/Classes/NSData+Base64.h
index c92d1f6a..1633a72b 100644
--- a/StoneIsland/platforms/ios/CordovaLib/Classes/NSData+Base64.h
+++ b/StoneIsland/platforms/ios/CordovaLib/Classes/NSData+Base64.h
@@ -41,7 +41,7 @@ char *CDVNewBase64Encode(
- (NSString*)base64EncodedString CDV_DEPRECATED(3.8 .0, "Use [NSData cdv_base64EncodedString]");
-+ (NSData*)cdv_dataFromBase64String:(NSString*)aString;
-- (NSString*)cdv_base64EncodedString;
++ (NSData*)cdv_dataFromBase64String:(NSString*)aString CDV_DEPRECATED(3.9.2, "Use NSData initWithBase64EncodedString instead. This will be removed in 4.0.0");
+- (NSString*)cdv_base64EncodedString CDV_DEPRECATED(3.9.2, "Use NSData base64EncodedStringWithOptions instead. This will be removed in 4.0.0");
@end
diff --git a/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/CordovaLib.xcscheme b/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/CordovaLib.xcscheme
deleted file mode 100644
index 5dce491f..00000000
--- a/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/CordovaLib.xcscheme
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
- LastUpgradeVersion = "0640"
- version = "1.3">
- <BuildAction
- parallelizeBuildables = "YES"
- buildImplicitDependencies = "YES">
- <BuildActionEntries>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "YES"
- buildForArchiving = "YES"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "D2AAC07D0554694100DB518D"
- BuildableName = "libCordova.a"
- BlueprintName = "CordovaLib"
- ReferencedContainer = "container:CordovaLib.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- </BuildActionEntries>
- </BuildAction>
- <TestAction
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
- shouldUseLaunchSchemeArgsEnv = "YES"
- buildConfiguration = "Debug">
- <Testables>
- </Testables>
- </TestAction>
- <LaunchAction
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
- launchStyle = "0"
- useCustomWorkingDirectory = "NO"
- buildConfiguration = "Debug"
- ignoresPersistentStateOnLaunch = "NO"
- debugDocumentVersioning = "YES"
- allowLocationSimulation = "YES">
- <MacroExpansion>
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "D2AAC07D0554694100DB518D"
- BuildableName = "libCordova.a"
- BlueprintName = "CordovaLib"
- ReferencedContainer = "container:CordovaLib.xcodeproj">
- </BuildableReference>
- </MacroExpansion>
- <AdditionalOptions>
- </AdditionalOptions>
- </LaunchAction>
- <ProfileAction
- shouldUseLaunchSchemeArgsEnv = "YES"
- savedToolIdentifier = ""
- useCustomWorkingDirectory = "NO"
- buildConfiguration = "Release"
- debugDocumentVersioning = "YES">
- <MacroExpansion>
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "D2AAC07D0554694100DB518D"
- BuildableName = "libCordova.a"
- BlueprintName = "CordovaLib"
- ReferencedContainer = "container:CordovaLib.xcodeproj">
- </BuildableReference>
- </MacroExpansion>
- </ProfileAction>
- <AnalyzeAction
- buildConfiguration = "Debug">
- </AnalyzeAction>
- <ArchiveAction
- buildConfiguration = "Release"
- revealArchiveInOrganizer = "YES">
- </ArchiveAction>
-</Scheme>
diff --git a/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/xcschememanagement.plist b/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/xcschememanagement.plist
deleted file mode 100644
index 283503be..00000000
--- a/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/xcschememanagement.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>SchemeUserState</key>
- <dict>
- <key>CordovaLib.xcscheme</key>
- <dict>
- <key>orderHint</key>
- <integer>1</integer>
- </dict>
- </dict>
- <key>SuppressBuildableAutocreation</key>
- <dict>
- <key>D2AAC07D0554694100DB518D</key>
- <dict>
- <key>primary</key>
- <true/>
- </dict>
- </dict>
-</dict>
-</plist>
diff --git a/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/CordovaLib.xcscheme b/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/CordovaLib.xcscheme
deleted file mode 100644
index 5b0b1fda..00000000
--- a/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/CordovaLib.xcscheme
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
- LastUpgradeVersion = "0630"
- version = "1.3">
- <BuildAction
- parallelizeBuildables = "YES"
- buildImplicitDependencies = "YES">
- <BuildActionEntries>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "YES"
- buildForArchiving = "YES"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "D2AAC07D0554694100DB518D"
- BuildableName = "libCordova.a"
- BlueprintName = "CordovaLib"
- ReferencedContainer = "container:CordovaLib.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- </BuildActionEntries>
- </BuildAction>
- <TestAction
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
- shouldUseLaunchSchemeArgsEnv = "YES"
- buildConfiguration = "Debug">
- <Testables>
- </Testables>
- </TestAction>
- <LaunchAction
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
- launchStyle = "0"
- useCustomWorkingDirectory = "NO"
- buildConfiguration = "Debug"
- ignoresPersistentStateOnLaunch = "NO"
- debugDocumentVersioning = "YES"
- allowLocationSimulation = "YES">
- <MacroExpansion>
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "D2AAC07D0554694100DB518D"
- BuildableName = "libCordova.a"
- BlueprintName = "CordovaLib"
- ReferencedContainer = "container:CordovaLib.xcodeproj">
- </BuildableReference>
- </MacroExpansion>
- <AdditionalOptions>
- </AdditionalOptions>
- </LaunchAction>
- <ProfileAction
- shouldUseLaunchSchemeArgsEnv = "YES"
- savedToolIdentifier = ""
- useCustomWorkingDirectory = "NO"
- buildConfiguration = "Release"
- debugDocumentVersioning = "YES">
- <MacroExpansion>
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "D2AAC07D0554694100DB518D"
- BuildableName = "libCordova.a"
- BlueprintName = "CordovaLib"
- ReferencedContainer = "container:CordovaLib.xcodeproj">
- </BuildableReference>
- </MacroExpansion>
- </ProfileAction>
- <AnalyzeAction
- buildConfiguration = "Debug">
- </AnalyzeAction>
- <ArchiveAction
- buildConfiguration = "Release"
- revealArchiveInOrganizer = "YES">
- </ArchiveAction>
-</Scheme>
diff --git a/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist b/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist
deleted file mode 100644
index 283503be..00000000
--- a/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>SchemeUserState</key>
- <dict>
- <key>CordovaLib.xcscheme</key>
- <dict>
- <key>orderHint</key>
- <integer>1</integer>
- </dict>
- </dict>
- <key>SuppressBuildableAutocreation</key>
- <dict>
- <key>D2AAC07D0554694100DB518D</key>
- <dict>
- <key>primary</key>
- <true/>
- </dict>
- </dict>
-</dict>
-</plist>
diff --git a/StoneIsland/platforms/ios/CordovaLib/VERSION b/StoneIsland/platforms/ios/CordovaLib/VERSION
index 19811903..2009c7df 100644
--- a/StoneIsland/platforms/ios/CordovaLib/VERSION
+++ b/StoneIsland/platforms/ios/CordovaLib/VERSION
@@ -1 +1 @@
-3.8.0
+3.9.2
diff --git a/StoneIsland/platforms/ios/CordovaLib/cordova.js b/StoneIsland/platforms/ios/CordovaLib/cordova.js
index 4f781077..46ab90b7 100644
--- a/StoneIsland/platforms/ios/CordovaLib/cordova.js
+++ b/StoneIsland/platforms/ios/CordovaLib/cordova.js
@@ -1,5 +1,5 @@
// Platform: ios
-// fc4db9145934bd0053161cbf9ffc0caf83b770c6
+// 49a8db57fa070d20ea7b304a53ffec3d7250c5af
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -19,7 +19,7 @@
under the License.
*/
;(function() {
-var PLATFORM_VERSION_BUILD_LABEL = '3.8.0';
+var PLATFORM_VERSION_BUILD_LABEL = '3.9.2';
// file: src/scripts/require.js
/*jshint -W079 */
@@ -101,10 +101,17 @@ if (typeof module === "object" && typeof require === "function") {
// file: src/cordova.js
define("cordova", function(require, exports, module) {
+// Workaround for Windows 10 in hosted environment case
+// http://www.w3.org/html/wg/drafts/html/master/browsers.html#named-access-on-the-window-object
+if (window.cordova && !(window.cordova instanceof HTMLElement)) {
+ throw new Error("cordova already defined");
+}
+
var channel = require('cordova/channel');
var platform = require('cordova/platform');
+
/**
* Intercept calls to addEventListener + removeEventListener and handle deviceready,
* resume, and pause events.
@@ -326,7 +333,6 @@ module.exports = cordova;
// file: src/common/argscheck.js
define("cordova/argscheck", function(require, exports, module) {
-var exec = require('cordova/exec');
var utils = require('cordova/utils');
var moduleExports = module.exports;
@@ -811,7 +817,7 @@ module.exports = channel;
});
-// file: src/ios/exec.js
+// file: e:/cordova/cordova-ios/cordova-js-src/exec.js
define("cordova/exec", function(require, exports, module) {
/**
@@ -1220,6 +1226,7 @@ if (!window.console.warn) {
// Register pause, resume and deviceready channels as events on document.
channel.onPause = cordova.addDocumentEventHandler('pause');
channel.onResume = cordova.addDocumentEventHandler('resume');
+channel.onActivated = cordova.addDocumentEventHandler('activated');
channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');
// Listen for DOMContentLoaded and notify our channel subscribers.
@@ -1281,10 +1288,12 @@ define("cordova/init_b", function(require, exports, module) {
var channel = require('cordova/channel');
var cordova = require('cordova');
+var modulemapper = require('cordova/modulemapper');
var platform = require('cordova/platform');
+var pluginloader = require('cordova/pluginloader');
var utils = require('cordova/utils');
-var platformInitChannelsArray = [channel.onDOMContentLoaded, channel.onNativeReady];
+var platformInitChannelsArray = [channel.onDOMContentLoaded, channel.onNativeReady, channel.onPluginsReady];
// setting exec
cordova.exec = require('cordova/exec');
@@ -1347,6 +1356,7 @@ if (!window.console.warn) {
// Register pause, resume and deviceready channels as events on document.
channel.onPause = cordova.addDocumentEventHandler('pause');
channel.onResume = cordova.addDocumentEventHandler('resume');
+channel.onActivated = cordova.addDocumentEventHandler('activated');
channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');
// Listen for DOMContentLoaded and notify our channel subscribers.
@@ -1368,10 +1378,19 @@ if (window._nativeReady) {
// Call the platform-specific initialization.
platform.bootstrap && platform.bootstrap();
+// Wrap in a setTimeout to support the use-case of having plugin JS appended to cordova.js.
+// The delay allows the attached modules to be defined before the plugin loader looks for them.
+setTimeout(function() {
+ pluginloader.load(function() {
+ channel.onPluginsReady.fire();
+ });
+}, 0);
+
/**
* Create all cordova objects once native side is ready.
*/
channel.join(function() {
+ modulemapper.mapModules(window);
platform.initialize && platform.initialize();
@@ -1490,7 +1509,104 @@ exports.reset();
});
-// file: src/ios/platform.js
+// file: src/common/modulemapper_b.js
+define("cordova/modulemapper_b", function(require, exports, module) {
+
+var builder = require('cordova/builder'),
+ symbolList = [],
+ deprecationMap;
+
+exports.reset = function() {
+ symbolList = [];
+ deprecationMap = {};
+};
+
+function addEntry(strategy, moduleName, symbolPath, opt_deprecationMessage) {
+ symbolList.push(strategy, moduleName, symbolPath);
+ if (opt_deprecationMessage) {
+ deprecationMap[symbolPath] = opt_deprecationMessage;
+ }
+}
+
+// Note: Android 2.3 does have Function.bind().
+exports.clobbers = function(moduleName, symbolPath, opt_deprecationMessage) {
+ addEntry('c', moduleName, symbolPath, opt_deprecationMessage);
+};
+
+exports.merges = function(moduleName, symbolPath, opt_deprecationMessage) {
+ addEntry('m', moduleName, symbolPath, opt_deprecationMessage);
+};
+
+exports.defaults = function(moduleName, symbolPath, opt_deprecationMessage) {
+ addEntry('d', moduleName, symbolPath, opt_deprecationMessage);
+};
+
+exports.runs = function(moduleName) {
+ addEntry('r', moduleName, null);
+};
+
+function prepareNamespace(symbolPath, context) {
+ if (!symbolPath) {
+ return context;
+ }
+ var parts = symbolPath.split('.');
+ var cur = context;
+ for (var i = 0, part; part = parts[i]; ++i) {
+ cur = cur[part] = cur[part] || {};
+ }
+ return cur;
+}
+
+exports.mapModules = function(context) {
+ var origSymbols = {};
+ context.CDV_origSymbols = origSymbols;
+ for (var i = 0, len = symbolList.length; i < len; i += 3) {
+ var strategy = symbolList[i];
+ var moduleName = symbolList[i + 1];
+ var module = require(moduleName);
+ // <runs/>
+ if (strategy == 'r') {
+ continue;
+ }
+ var symbolPath = symbolList[i + 2];
+ var lastDot = symbolPath.lastIndexOf('.');
+ var namespace = symbolPath.substr(0, lastDot);
+ var lastName = symbolPath.substr(lastDot + 1);
+
+ var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null;
+ var parentObj = prepareNamespace(namespace, context);
+ var target = parentObj[lastName];
+
+ if (strategy == 'm' && target) {
+ builder.recursiveMerge(target, module);
+ } else if ((strategy == 'd' && !target) || (strategy != 'd')) {
+ if (!(symbolPath in origSymbols)) {
+ origSymbols[symbolPath] = target;
+ }
+ builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg);
+ }
+ }
+};
+
+exports.getOriginalSymbol = function(context, symbolPath) {
+ var origSymbols = context.CDV_origSymbols;
+ if (origSymbols && (symbolPath in origSymbols)) {
+ return origSymbols[symbolPath];
+ }
+ var parts = symbolPath.split('.');
+ var obj = context;
+ for (var i = 0; i < parts.length; ++i) {
+ obj = obj && obj[parts[i]];
+ }
+ return obj;
+};
+
+exports.reset();
+
+
+});
+
+// file: e:/cordova/cordova-ios/cordova-js-src/platform.js
define("cordova/platform", function(require, exports, module) {
module.exports = {
@@ -1615,6 +1731,54 @@ exports.load = function(callback) {
});
+// file: src/common/pluginloader_b.js
+define("cordova/pluginloader_b", function(require, exports, module) {
+
+var modulemapper = require('cordova/modulemapper');
+
+// Handler for the cordova_plugins.js content.
+// See plugman's plugin_loader.js for the details of this object.
+function handlePluginsObject(moduleList) {
+ // if moduleList is not defined or empty, we've nothing to do
+ if (!moduleList || !moduleList.length) {
+ return;
+ }
+
+ // Loop through all the modules and then through their clobbers and merges.
+ for (var i = 0, module; module = moduleList[i]; i++) {
+ if (module.clobbers && module.clobbers.length) {
+ for (var j = 0; j < module.clobbers.length; j++) {
+ modulemapper.clobbers(module.id, module.clobbers[j]);
+ }
+ }
+
+ if (module.merges && module.merges.length) {
+ for (var k = 0; k < module.merges.length; k++) {
+ modulemapper.merges(module.id, module.merges[k]);
+ }
+ }
+
+ // Finally, if runs is truthy we want to simply require() the module.
+ if (module.runs) {
+ modulemapper.runs(module.id);
+ }
+ }
+}
+
+// Loads all plugins' js-modules. Plugin loading is syncronous in browserified bundle
+// but the method accepts callback to be compatible with non-browserify flow.
+// onDeviceReady is blocked on onPluginsReady. onPluginsReady is fired when there are
+// no plugins to load, or they are all done.
+exports.load = function(callback) {
+ var moduleList = require("cordova/plugin_list");
+ handlePluginsObject(moduleList);
+
+ callback();
+};
+
+
+});
+
// file: src/common/urlutil.js
define("cordova/urlutil", function(require, exports, module) {
@@ -1694,15 +1858,14 @@ utils.typeName = function(val) {
/**
* Returns an indication of whether the argument is an array or not
*/
-utils.isArray = function(a) {
- return utils.typeName(a) == 'Array';
-};
+utils.isArray = Array.isArray ||
+ function(a) {return utils.typeName(a) == 'Array';};
/**
* Returns an indication of whether the argument is a Date or not
*/
utils.isDate = function(d) {
- return utils.typeName(d) == 'Date';
+ return (d instanceof Date);
};
/**
@@ -1736,17 +1899,25 @@ utils.clone = function(obj) {
* Returns a wrapped version of the function
*/
utils.close = function(context, func, params) {
- if (typeof params == 'undefined') {
- return function() {
- return func.apply(context, arguments);
- };
- } else {
- return function() {
- return func.apply(context, params);
- };
- }
+ return function() {
+ var args = params || arguments;
+ return func.apply(context, args);
+ };
};
+//------------------------------------------------------------------------------
+function UUIDcreatePart(length) {
+ var uuidpart = "";
+ for (var i=0; i<length; i++) {
+ var uuidchar = parseInt((Math.random() * 256), 10).toString(16);
+ if (uuidchar.length == 1) {
+ uuidchar = "0" + uuidchar;
+ }
+ uuidpart += uuidchar;
+ }
+ return uuidpart;
+}
+
/**
* Create a UUID
*/
@@ -1758,6 +1929,7 @@ utils.createUUID = function() {
UUIDcreatePart(6);
};
+
/**
* Extends a child object from a parent object using classical inheritance
* pattern.
@@ -1767,6 +1939,7 @@ utils.extend = (function() {
var F = function() {};
// extend Child from Parent
return function(Child, Parent) {
+
F.prototype = Parent.prototype;
Child.prototype = new F();
Child.__super__ = Parent.prototype;
@@ -1786,18 +1959,7 @@ utils.alert = function(msg) {
};
-//------------------------------------------------------------------------------
-function UUIDcreatePart(length) {
- var uuidpart = "";
- for (var i=0; i<length; i++) {
- var uuidchar = parseInt((Math.random() * 256), 10).toString(16);
- if (uuidchar.length == 1) {
- uuidchar = "0" + uuidchar;
- }
- uuidpart += uuidchar;
- }
- return uuidpart;
-}
+
});