Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 73b6659

Browse files
jcesarmobilemlynch
authored andcommittedFeb 18, 2019
feat(ios): Remove WKSuspendInBackground preference (#309)
Remove WKSuspendInBackground preference as it uses a private API BREAKING CHANGE: Remove the WKSuspendInBackground preference, so app relying on that prefere will not behave as expected Closes #286
1 parent d52d37e commit 73b6659

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed
 

‎README.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ A Web View plugin for Cordova, focused on providing the highest performance expe
2929

3030
This plugin uses WKWebView on iOS and the latest evergreen webview on Android. Additionally, this plugin makes it easy to use HTML5 style routing that web developers expect for building single-page apps.
3131

32-
Note: This repo and its documentation are for `cordova-plugin-ionic-webview` @ `3.x`, which uses the new features that may not work with all apps. See [Requirements](#plugin-requirements) and [Migrating to 3.x](#migrating-to-3x).
32+
Note: This repo and its documentation are for `cordova-plugin-ionic-webview` @ `4.x`, which uses the new features that may not work with all apps. See [Requirements](#plugin-requirements) and [Migrating to 4.x](#migrating-to-4x).
3333

3434
2.x documentation can be found [here](https://github.com/ionic-team/cordova-plugin-ionic-webview/blob/2.x/README.md).
3535

@@ -107,14 +107,6 @@ Values like `http`, `https` or `file` are not valid and will use default value i
107107

108108
If you change it, you'll need to add a new `allow-navigation` entry in the `config.xml` for the configured scheme (i.e `<allow-navigation href="httpsionic://*"/>` if `iosScheme` is set to `httpsionic`).
109109

110-
#### WKSuspendInBackground
111-
112-
```xml
113-
<preference name="WKSuspendInBackground" value="true" />
114-
```
115-
116-
Set to false to stop WKWebView suspending in background too eagerly.
117-
118110
#### KeyboardAppearanceDark
119111

120112
```xml
@@ -129,7 +121,7 @@ Whether to use a dark styled keyboard on iOS
129121
* **iOS**: iOS 11+ and `cordova-ios` 4+
130122
* **Android**: Android 4.4+ and `cordova-android` 6.4+
131123

132-
## Migrating to 3.x
124+
## Migrating to 4.x
133125

134126
1. Remove and re-add the Web View plugin:
135127

‎src/ios/CDVWKWebViewEngine.m

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,6 @@ @interface CDVWKWebViewEngine ()
104104
// expose private configuration value required for background operation
105105
@interface WKWebViewConfiguration ()
106106

107-
@property (setter=_setAlwaysRunsAtForegroundPriority:, nonatomic) bool _alwaysRunsAtForegroundPriority;
108-
109107
@end
110108

111109

@@ -179,8 +177,6 @@ - (WKWebViewConfiguration*) createConfigurationFromSettings:(NSDictionary*)setti
179177
return configuration;
180178
}
181179

182-
//required to stop wkwebview suspending in background too eagerly (as used in background mode plugin)
183-
configuration._alwaysRunsAtForegroundPriority = ![settings cordovaBoolSettingForKey:@"WKSuspendInBackground" defaultValue:YES];
184180
configuration.allowsInlineMediaPlayback = [settings cordovaBoolSettingForKey:@"AllowInlineMediaPlayback" defaultValue:YES];
185181
configuration.suppressesIncrementalRendering = [settings cordovaBoolSettingForKey:@"SuppressesIncrementalRendering" defaultValue:NO];
186182
configuration.allowsAirPlayForMediaPlayback = [settings cordovaBoolSettingForKey:@"MediaPlaybackAllowsAirPlay" defaultValue:YES];

0 commit comments

Comments
 (0)
Please sign in to comment.