You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ia...@apache.org on 2014/04/25 20:14:22 UTC
[01/10] git commit: Add necessary capability so the plugin works on
its own
Repository: cordova-plugin-inappbrowser
Updated Branches:
refs/heads/master 1c98bc5b3 -> be9034ff6
Add necessary capability so the plugin works on its own
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/bdf4ade2
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/bdf4ade2
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/bdf4ade2
Branch: refs/heads/master
Commit: bdf4ade2bb1e5805ebd632f264fcdd09109cc5d1
Parents: e282cc9
Author: Nadya Atanasova <na...@gmail.com>
Authored: Wed Mar 26 15:51:49 2014 +0200
Committer: Nadya Atanasova <na...@gmail.com>
Committed: Mon Mar 31 16:36:18 2014 +0300
----------------------------------------------------------------------
plugin.xml | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/bdf4ade2/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 932ff83..d2ec6f5 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -102,6 +102,10 @@
</feature>
</config-file>
+ <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App/Capabilities">
+ <Capability Name="ID_CAP_NETWORKING" />
+ </config-file>
+
<source-file src="src/wp/InAppBrowser.cs" />
</platform>
@@ -116,6 +120,10 @@
</feature>
</config-file>
+ <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App/Capabilities">
+ <Capability Name="ID_CAP_NETWORKING" />
+ </config-file>
+
<source-file src="src/wp/InAppBrowser.cs" />
</platform>
[07/10] git commit: CB-6482 InAppBrowser calls incorrect callback on
WP8
Posted by ia...@apache.org.
CB-6482 InAppBrowser calls incorrect callback on WP8
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/ab7494fa
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/ab7494fa
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/ab7494fa
Branch: refs/heads/master
Commit: ab7494faa059a8e90fb8f88c5c5ef40e8a154478
Parents: e282cc9
Author: sgrebnov <v-...@microsoft.com>
Authored: Mon Apr 21 15:28:03 2014 -0700
Committer: sgrebnov <v-...@microsoft.com>
Committed: Mon Apr 21 15:28:03 2014 -0700
----------------------------------------------------------------------
src/wp/InAppBrowser.cs | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/ab7494fa/src/wp/InAppBrowser.cs
----------------------------------------------------------------------
diff --git a/src/wp/InAppBrowser.cs b/src/wp/InAppBrowser.cs
index 454464d..9d49165 100644
--- a/src/wp/InAppBrowser.cs
+++ b/src/wp/InAppBrowser.cs
@@ -41,6 +41,8 @@ namespace WPCordovaClassLib.Cordova.Commands
protected bool ShowLocation {get;set;}
protected bool StartHidden {get;set;}
+ protected string NavigationCallbackId { get; set; }
+
public void open(string options)
{
// reset defaults on ShowLocation + StartHidden features
@@ -52,6 +54,7 @@ namespace WPCordovaClassLib.Cordova.Commands
string urlLoc = args[0];
string target = args[1];
string featString = args[2];
+ this.NavigationCallbackId = args[3];
string[] features = featString.Split(',');
foreach (string str in features)
@@ -367,7 +370,7 @@ namespace WPCordovaClassLib.Cordova.Commands
string message = "{\"type\":\"exit\"}";
PluginResult result = new PluginResult(PluginResult.Status.OK, message);
result.KeepCallback = false;
- this.DispatchCommandResult(result);
+ this.DispatchCommandResult(result, NavigationCallbackId);
});
}
}
@@ -385,7 +388,7 @@ namespace WPCordovaClassLib.Cordova.Commands
string message = "{\"type\":\"loadstop\", \"url\":\"" + e.Uri.OriginalString + "\"}";
PluginResult result = new PluginResult(PluginResult.Status.OK, message);
result.KeepCallback = true;
- this.DispatchCommandResult(result);
+ this.DispatchCommandResult(result, NavigationCallbackId);
}
void browser_NavigationFailed(object sender, System.Windows.Navigation.NavigationFailedEventArgs e)
@@ -393,7 +396,7 @@ namespace WPCordovaClassLib.Cordova.Commands
string message = "{\"type\":\"error\",\"url\":\"" + e.Uri.OriginalString + "\"}";
PluginResult result = new PluginResult(PluginResult.Status.ERROR, message);
result.KeepCallback = true;
- this.DispatchCommandResult(result);
+ this.DispatchCommandResult(result, NavigationCallbackId);
}
void browser_Navigating(object sender, NavigatingEventArgs e)
@@ -401,7 +404,7 @@ namespace WPCordovaClassLib.Cordova.Commands
string message = "{\"type\":\"loadstart\",\"url\":\"" + e.Uri.OriginalString + "\"}";
PluginResult result = new PluginResult(PluginResult.Status.OK, message);
result.KeepCallback = true;
- this.DispatchCommandResult(result);
+ this.DispatchCommandResult(result, NavigationCallbackId);
}
}
[04/10] git commit: CB-6360 - improvement: feature detection instead
of iOS version detection
Posted by ia...@apache.org.
CB-6360 - improvement: feature detection instead of iOS version detection
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/c25bc30d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/c25bc30d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/c25bc30d
Branch: refs/heads/master
Commit: c25bc30d7d1715b0cb945051cdf1866c6436f61f
Parents: b9f8fcd
Author: Shazron Abdullah <sh...@apache.org>
Authored: Thu Apr 17 16:52:21 2014 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Thu Apr 17 16:52:21 2014 -0700
----------------------------------------------------------------------
src/ios/CDVInAppBrowser.m | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/c25bc30d/src/ios/CDVInAppBrowser.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m
index aed735c..5253688 100644
--- a/src/ios/CDVInAppBrowser.m
+++ b/src/ios/CDVInAppBrowser.m
@@ -553,11 +553,14 @@
self.addressLabel.enabled = YES;
self.addressLabel.hidden = NO;
self.addressLabel.lineBreakMode = NSLineBreakByTruncatingTail;
- if (IsAtLeastiOSVersion(@"6.0")) {
- self.addressLabel.minimumScaleFactor = 10.0/[UIFont labelFontSize];
- } else {
- self.addressLabel.minimumFontSize = 10.000;
+
+ if ([self.addressLabel respondsToSelector:NSSelectorFromString(@"setMinimumScaleFactor:")]) {
+ [self.addressLabel setValue:@(10.0/[UIFont labelFontSize]) forKey:@"minimumScaleFactor"];
+ } else
+ if ([self.addressLabel respondsToSelector:NSSelectorFromString(@"setMinimumFontSize:")]) {
+ [self.addressLabel setValue:@(10.0) forKey:@"minimumFontSize"];
}
+
self.addressLabel.multipleTouchEnabled = NO;
self.addressLabel.numberOfLines = 1;
self.addressLabel.opaque = NO;
[08/10] git commit: Merge branch 'CB-6482' of
https://github.com/sgrebnov/cordova-plugin-inappbrowser into dev
Posted by ia...@apache.org.
Merge branch 'CB-6482' of https://github.com/sgrebnov/cordova-plugin-inappbrowser into dev
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/907bba6c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/907bba6c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/907bba6c
Branch: refs/heads/master
Commit: 907bba6cf68693658fac90b00f8df635ddb8a11b
Parents: 40778ba ab7494f
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Mon Apr 21 17:44:47 2014 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Mon Apr 21 17:44:47 2014 -0700
----------------------------------------------------------------------
src/wp/InAppBrowser.cs | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/907bba6c/src/wp/InAppBrowser.cs
----------------------------------------------------------------------
diff --cc src/wp/InAppBrowser.cs
index cbd5d26,9d49165..fdf9ac7
--- a/src/wp/InAppBrowser.cs
+++ b/src/wp/InAppBrowser.cs
@@@ -69,30 -54,29 +71,31 @@@ namespace WPCordovaClassLib.Cordova.Com
string urlLoc = args[0];
string target = args[1];
string featString = args[2];
+ this.NavigationCallbackId = args[3];
- string[] features = featString.Split(',');
- foreach (string str in features)
+ if (!string.IsNullOrEmpty(featString))
{
- try
+ string[] features = featString.Split(',');
+ foreach (string str in features)
{
- string[] split = str.Split('=');
- switch (split[0])
+ try
+ {
+ string[] split = str.Split('=');
+ switch (split[0])
+ {
+ case "location":
+ ShowLocation = split[1].StartsWith("yes", StringComparison.OrdinalIgnoreCase);
+ break;
+ case "hidden":
+ StartHidden = split[1].StartsWith("yes", StringComparison.OrdinalIgnoreCase);
+ break;
+ }
+ }
+ catch (Exception)
{
- case "location":
- ShowLocation = split[1].ToLower().StartsWith("yes");
- break;
- case "hidden":
- StartHidden = split[1].ToLower().StartsWith("yes");
- break;
+ // some sort of invalid param was passed, moving on ...
}
}
- catch(Exception)
- {
- // some sort of invalid param was passed, moving on ...
- }
-
}
/*
_self - opens in the Cordova WebView if url is in the white-list, else it opens in the InAppBrowser
[06/10] git commit: CB-6474 InAppBrowser. Add data urls support to WP8
Posted by ia...@apache.org.
CB-6474 InAppBrowser. Add data urls support to WP8
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/8f2ad211
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/8f2ad211
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/8f2ad211
Branch: refs/heads/master
Commit: 8f2ad211ad60a10d7234124ff3c815e6a3b70ff1
Parents: e282cc9
Author: sgrebnov <v-...@microsoft.com>
Authored: Fri Apr 18 10:47:20 2014 -0700
Committer: sgrebnov <v-...@microsoft.com>
Committed: Fri Apr 18 10:47:20 2014 -0700
----------------------------------------------------------------------
src/wp/InAppBrowser.cs | 31 ++++++++++++++++++++++++++++---
1 file changed, 28 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/8f2ad211/src/wp/InAppBrowser.cs
----------------------------------------------------------------------
diff --git a/src/wp/InAppBrowser.cs b/src/wp/InAppBrowser.cs
index 454464d..844ae16 100644
--- a/src/wp/InAppBrowser.cs
+++ b/src/wp/InAppBrowser.cs
@@ -200,7 +200,7 @@ namespace WPCordovaClassLib.Cordova.Commands
if (cView != null)
{
WebBrowser br = cView.Browser;
- br.Navigate(loc);
+ br.Navigate2(loc);
}
}
@@ -225,7 +225,7 @@ namespace WPCordovaClassLib.Cordova.Commands
if (browser != null)
{
//browser.IsGeolocationEnabled = opts.isGeolocationEnabled;
- browser.Navigate(loc);
+ browser.Navigate2(loc);
}
else
{
@@ -248,7 +248,7 @@ namespace WPCordovaClassLib.Cordova.Commands
browser.Navigating += new EventHandler<NavigatingEventArgs>(browser_Navigating);
browser.NavigationFailed += new System.Windows.Navigation.NavigationFailedEventHandler(browser_NavigationFailed);
browser.Navigated += new EventHandler<System.Windows.Navigation.NavigationEventArgs>(browser_Navigated);
- browser.Navigate(loc);
+ browser.Navigate2(loc);
if (StartHidden)
{
@@ -405,4 +405,29 @@ namespace WPCordovaClassLib.Cordova.Commands
}
}
+
+ internal static class WebBrowserExtensions
+ {
+ /// <summary>
+ /// Improved method to initiate request to the provided URI. Supports 'data:text/html' urls.
+ /// </summary>
+ /// <param name="browser">The browser instance</param>
+ /// <param name="uri">The requested uri</param>
+ internal static void Navigate2(this WebBrowser browser, Uri uri)
+ {
+ // IE10 does not support data uri so we use NavigateToString method instead
+ if (uri.Scheme == "data")
+ {
+ // we should remove the scheme identifier and unescape the uri
+ string uriString = Uri.UnescapeDataString(uri.AbsoluteUri);
+ // format is 'data:text/html, ...'
+ string html = new System.Text.RegularExpressions.Regex("^data:text/html,").Replace(uriString, "");
+ browser.NavigateToString(html);
+ }
+ else
+ {
+ browser.Navigate(uri);
+ }
+ }
+ }
}
[02/10] git commit: CB-6452 Incremented plugin version on dev branch.
Posted by ia...@apache.org.
CB-6452 Incremented plugin version on dev branch.
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/11f833b4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/11f833b4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/11f833b4
Branch: refs/heads/master
Commit: 11f833b46d1318eee6b073d6ff2ec380fcb1ab89
Parents: 1c98bc5
Author: Ian Clelland <ic...@chromium.org>
Authored: Thu Apr 17 11:16:03 2014 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Thu Apr 17 11:16:03 2014 -0400
----------------------------------------------------------------------
plugin.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/11f833b4/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index c9e0169..70d9fea 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -20,7 +20,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="org.apache.cordova.inappbrowser"
- version="0.4.0">
+ version="0.4.1-dev">
<name>InAppBrowser</name>
<description>Cordova InAppBrowser Plugin</description>
[03/10] git commit: CB-5649 - InAppBrowser overrides App's orientation
Posted by ia...@apache.org.
CB-5649 - InAppBrowser overrides App's orientation
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/b9f8fcd8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/b9f8fcd8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/b9f8fcd8
Branch: refs/heads/master
Commit: b9f8fcd8a93f802dcf85f620f70a6dcd23b0f9c7
Parents: 11f833b
Author: Shazron Abdullah <sh...@apache.org>
Authored: Thu Apr 17 16:32:34 2014 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Thu Apr 17 16:32:40 2014 -0700
----------------------------------------------------------------------
src/ios/CDVInAppBrowser.h | 8 +++++++-
src/ios/CDVInAppBrowser.m | 36 +++++++++++++++++++++++++++++++++++-
2 files changed, 42 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/b9f8fcd8/src/ios/CDVInAppBrowser.h
----------------------------------------------------------------------
diff --git a/src/ios/CDVInAppBrowser.h b/src/ios/CDVInAppBrowser.h
index e643962..0ba07f1 100644
--- a/src/ios/CDVInAppBrowser.h
+++ b/src/ios/CDVInAppBrowser.h
@@ -63,7 +63,7 @@
@end
-@interface CDVInAppBrowserViewController : UIViewController <UIWebViewDelegate>{
+@interface CDVInAppBrowserViewController : UIViewController <UIWebViewDelegate, CDVScreenOrientationDelegate>{
@private
NSString* _userAgent;
NSString* _prevUserAgent;
@@ -92,4 +92,10 @@
- (id)initWithUserAgent:(NSString*)userAgent prevUserAgent:(NSString*)prevUserAgent browserOptions: (CDVInAppBrowserOptions*) browserOptions;
+@end
+
+@interface CDVInAppBrowserNavigationController : UINavigationController
+
+@property (nonatomic, weak) id <CDVScreenOrientationDelegate> orientationDelegate;
+
@end
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/b9f8fcd8/src/ios/CDVInAppBrowser.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m
index 68675c5..aed735c 100644
--- a/src/ios/CDVInAppBrowser.m
+++ b/src/ios/CDVInAppBrowser.m
@@ -216,8 +216,9 @@
_previousStatusBarStyle = [UIApplication sharedApplication].statusBarStyle;
- UINavigationController* nav = [[UINavigationController alloc]
+ CDVInAppBrowserNavigationController* nav = [[CDVInAppBrowserNavigationController alloc]
initWithRootViewController:self.inAppBrowserViewController];
+ nav.orientationDelegate = self.inAppBrowserViewController;
nav.navigationBarHidden = YES;
// Run later to avoid the "took a long time" log message.
dispatch_async(dispatch_get_main_queue(), ^{
@@ -965,3 +966,36 @@
}
@end
+
+@implementation CDVInAppBrowserNavigationController : UINavigationController
+
+#pragma mark CDVScreenOrientationDelegate
+
+- (BOOL)shouldAutorotate
+{
+ if ((self.orientationDelegate != nil) && [self.orientationDelegate respondsToSelector:@selector(shouldAutorotate)]) {
+ return [self.orientationDelegate shouldAutorotate];
+ }
+ return YES;
+}
+
+- (NSUInteger)supportedInterfaceOrientations
+{
+ if ((self.orientationDelegate != nil) && [self.orientationDelegate respondsToSelector:@selector(supportedInterfaceOrientations)]) {
+ return [self.orientationDelegate supportedInterfaceOrientations];
+ }
+
+ return 1 << UIInterfaceOrientationPortrait;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{
+ if ((self.orientationDelegate != nil) && [self.orientationDelegate respondsToSelector:@selector(shouldAutorotateToInterfaceOrientation:)]) {
+ return [self.orientationDelegate shouldAutorotateToInterfaceOrientation:interfaceOrientation];
+ }
+
+ return YES;
+}
+
+
+@end
[10/10] git commit: Merge branch 'enable-wp-capability' of
https://github.com/Icenium/cordova-plugin-inappbrowser into dev
Posted by ia...@apache.org.
Merge branch 'enable-wp-capability' of https://github.com/Icenium/cordova-plugin-inappbrowser into dev
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/be9034ff
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/be9034ff
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/be9034ff
Branch: refs/heads/master
Commit: be9034ff6c9d09f4fd3e67f3f4a9a42194ffabfa
Parents: e2a0bb8 bdf4ade
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Mon Apr 21 18:18:52 2014 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Mon Apr 21 18:18:52 2014 -0700
----------------------------------------------------------------------
plugin.xml | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/be9034ff/plugin.xml
----------------------------------------------------------------------
[09/10] git commit: Merge branch 'CB-6474' of
https://github.com/sgrebnov/cordova-plugin-inappbrowser into dev
Posted by ia...@apache.org.
Merge branch 'CB-6474' of https://github.com/sgrebnov/cordova-plugin-inappbrowser into dev
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/e2a0bb87
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/e2a0bb87
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/e2a0bb87
Branch: refs/heads/master
Commit: e2a0bb8715b78ee1edaa91935aec21f004ced384
Parents: 907bba6 8f2ad21
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Mon Apr 21 17:57:48 2014 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Mon Apr 21 17:57:48 2014 -0700
----------------------------------------------------------------------
src/wp/InAppBrowser.cs | 31 ++++++++++++++++++++++++++++---
1 file changed, 28 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/e2a0bb87/src/wp/InAppBrowser.cs
----------------------------------------------------------------------
[05/10] git commit: Fixed use of iOS 6 deprecated methods
Posted by ia...@apache.org.
Fixed use of iOS 6 deprecated methods
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/40778ba2
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/40778ba2
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/40778ba2
Branch: refs/heads/master
Commit: 40778ba23985019da58708b80e6d0016c8e0c4c1
Parents: c25bc30
Author: Shazron Abdullah <sh...@apache.org>
Authored: Thu Apr 17 17:02:59 2014 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Thu Apr 17 17:02:59 2014 -0700
----------------------------------------------------------------------
src/ios/CDVInAppBrowser.m | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/40778ba2/src/ios/CDVInAppBrowser.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m
index 5253688..8037a91 100644
--- a/src/ios/CDVInAppBrowser.m
+++ b/src/ios/CDVInAppBrowser.m
@@ -223,7 +223,7 @@
// Run later to avoid the "took a long time" log message.
dispatch_async(dispatch_get_main_queue(), ^{
if (self.inAppBrowserViewController != nil) {
- [self.viewController presentModalViewController:nav animated:YES];
+ [self.viewController presentViewController:nav animated:YES completion:nil];
}
});
}
@@ -489,7 +489,6 @@
self.webView.clearsContextBeforeDrawing = YES;
self.webView.clipsToBounds = YES;
self.webView.contentMode = UIViewContentModeScaleToFill;
- self.webView.contentStretch = CGRectFromString(@"{{0, 0}, {1, 1}}");
self.webView.multipleTouchEnabled = YES;
self.webView.opaque = YES;
self.webView.scalesPageToFit = NO;
@@ -502,7 +501,6 @@
self.spinner.clearsContextBeforeDrawing = NO;
self.spinner.clipsToBounds = NO;
self.spinner.contentMode = UIViewContentModeScaleToFill;
- self.spinner.contentStretch = CGRectFromString(@"{{0, 0}, {1, 1}}");
self.spinner.frame = CGRectMake(454.0, 231.0, 20.0, 20.0);
self.spinner.hidden = YES;
self.spinner.hidesWhenStopped = YES;
@@ -530,7 +528,6 @@
self.toolbar.clearsContextBeforeDrawing = NO;
self.toolbar.clipsToBounds = NO;
self.toolbar.contentMode = UIViewContentModeScaleToFill;
- self.toolbar.contentStretch = CGRectFromString(@"{{0, 0}, {1, 1}}");
self.toolbar.hidden = NO;
self.toolbar.multipleTouchEnabled = NO;
self.toolbar.opaque = NO;
@@ -549,15 +546,13 @@
self.addressLabel.clearsContextBeforeDrawing = YES;
self.addressLabel.clipsToBounds = YES;
self.addressLabel.contentMode = UIViewContentModeScaleToFill;
- self.addressLabel.contentStretch = CGRectFromString(@"{{0, 0}, {1, 1}}");
self.addressLabel.enabled = YES;
self.addressLabel.hidden = NO;
self.addressLabel.lineBreakMode = NSLineBreakByTruncatingTail;
if ([self.addressLabel respondsToSelector:NSSelectorFromString(@"setMinimumScaleFactor:")]) {
[self.addressLabel setValue:@(10.0/[UIFont labelFontSize]) forKey:@"minimumScaleFactor"];
- } else
- if ([self.addressLabel respondsToSelector:NSSelectorFromString(@"setMinimumFontSize:")]) {
+ } else if ([self.addressLabel respondsToSelector:NSSelectorFromString(@"setMinimumFontSize:")]) {
[self.addressLabel setValue:@(10.0) forKey:@"minimumFontSize"];
}
@@ -750,7 +745,7 @@
if ([self respondsToSelector:@selector(presentingViewController)]) {
[[self presentingViewController] dismissViewControllerAnimated:YES completion:nil];
} else {
- [[self parentViewController] dismissModalViewControllerAnimated:YES];
+ [[self parentViewController] dismissViewControllerAnimated:YES completion:nil];
}
});
}