Merge branch 'master' of github.com:apache/cordova-plugin-inappbrowser into master
This commit is contained in:
commit
3b8b793f8b
10
README.md
10
README.md
@ -176,6 +176,16 @@ At the moment the only supported target in OSX is `_system`.
|
|||||||
|
|
||||||
`_blank` and `_self` targets are not yet implemented and are ignored silently. Pull requests and patches to get these to work are greatly appreciated.
|
`_blank` and `_self` targets are not yet implemented and are ignored silently. Pull requests and patches to get these to work are greatly appreciated.
|
||||||
|
|
||||||
|
### iOS Quirks
|
||||||
|
|
||||||
|
Since the introduction of iPadOS 13, iPads try to adapt their content mode / user agent for the optimal browsing experience. This may result in iPads having their user agent set to Macintosh, making it hard to detect them as mobile devices using user agent string sniffing. You can change this with the `PreferredContentMode` preference in `config.xml`.
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<preference name="PreferredContentMode" value="mobile" />
|
||||||
|
```
|
||||||
|
|
||||||
|
The example above forces the user agent to contain `iPad`. The other option is to use the value `desktop` to turn the user agent to `Macintosh`.
|
||||||
|
|
||||||
### Browser Quirks
|
### Browser Quirks
|
||||||
|
|
||||||
- Plugin is implemented via iframe,
|
- Plugin is implemented via iframe,
|
||||||
|
@ -757,6 +757,15 @@ BOOL isExiting = FALSE;
|
|||||||
configuration.mediaPlaybackRequiresUserAction = _browserOptions.mediaplaybackrequiresuseraction;
|
configuration.mediaPlaybackRequiresUserAction = _browserOptions.mediaplaybackrequiresuseraction;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (@available(iOS 13.0, *)) {
|
||||||
|
NSString *contentMode = [self settingForKey:@"PreferredContentMode"];
|
||||||
|
if ([contentMode isEqual: @"mobile"]) {
|
||||||
|
configuration.defaultWebpagePreferences.preferredContentMode = WKContentModeMobile;
|
||||||
|
} else if ([contentMode isEqual: @"desktop"]) {
|
||||||
|
configuration.defaultWebpagePreferences.preferredContentMode = WKContentModeDesktop;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
self.webView = [[WKWebView alloc] initWithFrame:webViewBounds configuration:configuration];
|
self.webView = [[WKWebView alloc] initWithFrame:webViewBounds configuration:configuration];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user