Skip to content

Commit 6c55e61

Browse files
authored
breaking(ios): remove UIWebView (apache#635)
1 parent 09ad59f commit 6c55e61

11 files changed

+28
-1552
lines changed

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,26 +131,23 @@ instance, or the system browser.
131131

132132
iOS supports these additional options:
133133

134-
- __usewkwebview__: set to `yes` to use WKWebView engine for the InappBrowser. Omit or set to `no` (default) to use UIWebView. Note: Using `usewkwebview=yes` requires that a WKWebView engine plugin be installed in the Cordova project (e.g. [cordova-plugin-wkwebview-engine](https://github.com/apache/cordova-plugin-wkwebview-engine) or [cordova-plugin-ionic-webview](https://github.com/ionic-team/cordova-plugin-ionic-webview)).
135134
- __hidden__: set to `yes` to create the browser and load the page, but not show it. The loadstop event fires when loading is complete. Omit or set to `no` (default) to have the browser open and load normally.
136135
- __beforeload__: set to enable the `beforeload` event to modify which pages are actually loaded in the browser. Accepted values are `get` to intercept only GET requests, `post` to intercept on POST requests or `yes` to intercept both GET & POST requests. Note that POST requests are not currently supported and will be ignored (if you set `beforeload=post` it will raise an error).
137136
- __clearcache__: set to `yes` to have the browser's cookie cache cleared before the new window is opened
138137
- __clearsessioncache__: set to `yes` to have the session cookie cache cleared before the new window is opened. For WKWebView, requires iOS 11+ on target device.
139138
- __cleardata__: set to `yes` to have the browser's entire local storage cleared (cookies, HTML5 local storage, IndexedDB, etc.) before the new window is opened
140139
- __closebuttoncolor__: set as a valid hex color string, for example: `#00ff00`, to change from the default __Done__ button's color. Only applicable if toolbar is not disabled.
141140
- __closebuttoncaption__: set to a string to use as the __Done__ button's caption. Note that you need to localize this value yourself.
142-
- __disallowoverscroll__: Set to `yes` or `no` (default is `no`). Turns on/off the UIWebViewBounce property.
141+
- __disallowoverscroll__: Set to `yes` or `no` (default is `no`). Turns on/off the the bounce of the WKWebView's UIScrollView.
143142
- __hidenavigationbuttons__: set to `yes` or `no` to turn the toolbar navigation buttons on or off (defaults to `no`). Only applicable if toolbar is not disabled.
144143
- __navigationbuttoncolor__: set as a valid hex color string, for example: `#00ff00`, to change from the default color. Only applicable if navigation buttons are visible.
145144
- __toolbar__: set to `yes` or `no` to turn the toolbar on or off for the InAppBrowser (defaults to `yes`)
146145
- __toolbarcolor__: set as a valid hex color string, for example: `#00ff00`, to change from the default color of the toolbar. Only applicable if toolbar is not disabled.
147146
- __toolbartranslucent__: set to `yes` or `no` to make the toolbar translucent(semi-transparent) (defaults to `yes`). Only applicable if toolbar is not disabled.
148147
- __lefttoright__: Set to `yes` to swap positions of the navigation buttons and the close button. Specifically, close button goes to the right and navigation buttons to the left.
149-
- __enableViewportScale__: Set to `yes` or `no` to prevent viewport scaling through a meta tag (defaults to `no`). Only applicable to UIWebView (`usewkwebview=no`) and WKWebView (`usewkwebview=yes`) on iOS 10+.
150-
- __mediaPlaybackRequiresUserAction__: Set to `yes` to prevent HTML5 audio or video from autoplaying (defaults to `no`). Applicable to UIWebView (`usewkwebview=no`) and WKWebView (`usewkwebview=yes`).
151-
- __allowInlineMediaPlayback__: Set to `yes` or `no` to allow in-line HTML5 media playback, displaying within the browser window rather than a device-specific playback interface. The HTML's `video` element must also include the `webkit-playsinline` attribute (defaults to `no`). Applicable to UIWebView (`usewkwebview=no`) and WKWebView (`usewkwebview=yes`).
152-
- __keyboardDisplayRequiresUserAction__: Set to `yes` or `no` to open the keyboard when form elements receive focus via JavaScript's `focus()` call (defaults to `yes`). Only applicable to UIWebView (`usewkwebview=no`).
153-
- __suppressesIncrementalRendering__: Set to `yes` or `no` to wait until all new view content is received before being rendered (defaults to `no`). Only applicable to UIWebView (`usewkwebview=no`).
148+
- __enableViewportScale__: Set to `yes` or `no` to prevent viewport scaling through a meta tag (defaults to `no`).
149+
- __mediaPlaybackRequiresUserAction__: Set to `yes` to prevent HTML5 audio or video from autoplaying (defaults to `no`).
150+
- __allowInlineMediaPlayback__: Set to `yes` or `no` to allow in-line HTML5 media playback, displaying within the browser window rather than a device-specific playback interface. The HTML's `video` element must also include the `webkit-playsinline` attribute (defaults to `no`).
154151
- __presentationstyle__: Set to `pagesheet`, `formsheet` or `fullscreen` to set the [presentation style](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (defaults to `fullscreen`).
155152
- __transitionstyle__: Set to `fliphorizontal`, `crossdissolve` or `coververtical` to set the [transition style](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (defaults to `coververtical`).
156153
- __toolbarposition__: Set to `top` or `bottom` (default is `bottom`). Causes the toolbar to be at the top or bottom of the window.

plugin.xml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,27 +75,14 @@
7575
</js-module>
7676
<config-file target="config.xml" parent="/*">
7777
<feature name="InAppBrowser">
78-
<param name="ios-package" value="CDVInAppBrowser" />
79-
<param name="onload" value="true" />
80-
</feature>
81-
<feature name="UIInAppBrowser">
82-
<param name="ios-package" value="CDVUIInAppBrowser" />
83-
<param name="onload" value="true" />
84-
</feature>
85-
<feature name="WKInAppBrowser">
8678
<param name="ios-package" value="CDVWKInAppBrowser" />
8779
<param name="onload" value="true" />
8880
</feature>
8981
</config-file>
90-
91-
<header-file src="src/ios/CDVInAppBrowser.h" />
92-
<source-file src="src/ios/CDVInAppBrowser.m" />
9382
<header-file src="src/ios/CDVInAppBrowserOptions.h" />
9483
<source-file src="src/ios/CDVInAppBrowserOptions.m" />
9584
<header-file src="src/ios/CDVInAppBrowserNavigationController.h" />
9685
<source-file src="src/ios/CDVInAppBrowserNavigationController.m" />
97-
<header-file src="src/ios/CDVUIInAppBrowser.h" />
98-
<source-file src="src/ios/CDVUIInAppBrowser.m" />
9986
<header-file src="src/ios/CDVWKInAppBrowser.h" />
10087
<source-file src="src/ios/CDVWKInAppBrowser.m" />
10188
<header-file src="src/ios/CDVWKInAppBrowserUIDelegate.h" />

src/ios/CDVInAppBrowser.h

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/ios/CDVInAppBrowser.m

Lines changed: 0 additions & 172 deletions
This file was deleted.

src/ios/CDVInAppBrowserOptions.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
@interface CDVInAppBrowserOptions : NSObject {}
2222

23-
@property (nonatomic, assign) BOOL usewkwebview;
2423
@property (nonatomic, assign) BOOL location;
2524
@property (nonatomic, assign) BOOL toolbar;
2625
@property (nonatomic, copy) NSString* closebuttoncaption;
@@ -42,8 +41,6 @@
4241
@property (nonatomic, assign) BOOL enableviewportscale;
4342
@property (nonatomic, assign) BOOL mediaplaybackrequiresuseraction;
4443
@property (nonatomic, assign) BOOL allowinlinemediaplayback;
45-
@property (nonatomic, assign) BOOL keyboarddisplayrequiresuseraction;
46-
@property (nonatomic, assign) BOOL suppressesincrementalrendering;
4744
@property (nonatomic, assign) BOOL hidden;
4845
@property (nonatomic, assign) BOOL disallowoverscroll;
4946
@property (nonatomic, copy) NSString* beforeload;

src/ios/CDVInAppBrowserOptions.m

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ - (id)init
2525
{
2626
if (self = [super init]) {
2727
// default values
28-
self.usewkwebview = NO;
2928
self.location = YES;
3029
self.toolbar = YES;
3130
self.closebuttoncaption = nil;
@@ -38,8 +37,6 @@ - (id)init
3837
self.enableviewportscale = NO;
3938
self.mediaplaybackrequiresuseraction = NO;
4039
self.allowinlinemediaplayback = NO;
41-
self.keyboarddisplayrequiresuseraction = YES;
42-
self.suppressesincrementalrendering = NO;
4340
self.hidden = NO;
4441
self.disallowoverscroll = NO;
4542
self.hidenavigationbuttons = NO;

0 commit comments

Comments
 (0)