cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [cordova-plugin-inappbrowser] timbru31 commented on a change in pull request #688: (ios): allow to set "preferredContentMode"
Date Wed, 09 Sep 2020 11:25:31 GMT

timbru31 commented on a change in pull request #688:
URL: https://github.com/apache/cordova-plugin-inappbrowser/pull/688#discussion_r485534723



##########
File path: src/ios/CDVWKInAppBrowser.m
##########
@@ -758,6 +758,15 @@ - (void)createViews
         configuration.mediaPlaybackRequiresUserAction = _browserOptions.mediaplaybackrequiresuseraction;
     }
     
+    if (@available(iOS 13.0, *)) {
+        NSString *contentMode = [self settingForKey:@"PreferredContentMode"];
+        if ([contentMode  isEqual: @"mobile"]) {

Review comment:
       Objective-C noob here, two spaces required?, some for two lines below

##########
File path: README.md
##########
@@ -168,6 +168,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.
 
+### 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".

Review comment:
       ```suggestion
   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`.
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message