apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.16k stars 990 forks source link

Add PreferredContentMode preference #886

Closed NiklasMerz closed 4 years ago

NiklasMerz commented 4 years ago

Platforms affected

iOS

Motivation and Context

This adds a prefrence to the webview which is useful for iPads. Apple introduced a setting which by defaults changes the useragent of iPads from iPad to Macintosh to provide a "desktop browsing experience". The new preference allows to change the default value.

See original issue from IAB: apache/cordova-plugin-inappbrowser#687

Description

Changed like : apache/cordova-plugin-inappbrowser#688

Documenation: https://github.com/apache/cordova-docs/pull/1083

Testing

Automatic tests still pass. I found no automatic tests for preferences at build time.

I created a blank new app, added this platform and checked navigator.userAgent while changing the preference. It should be iPad for mobile and Macintosh for desktop.

Checklist

codecov-commenter commented 4 years ago

Codecov Report

Merging #886 into master will increase coverage by 1.89%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #886      +/-   ##
==========================================
+ Coverage   74.40%   76.30%   +1.89%     
==========================================
  Files          13       13              
  Lines        1676     1941     +265     
==========================================
+ Hits         1247     1481     +234     
- Misses        429      460      +31     
Impacted Files Coverage Δ
bin/templates/scripts/cordova/lib/prepare.js 86.60% <0.00%> (+1.19%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 02448ce...d27a366. Read the comment docs.