summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/ios/CordovaLib/Classes
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/Classes
parent0a55602cb98fea35632f8f11e840c65cc9011018 (diff)
rebuild project
Diffstat (limited to 'StoneIsland/platforms/ios/CordovaLib/Classes')
-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
7 files changed, 41 insertions, 22 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