Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(ios): allow to set "preferredContentMode" #688

Merged
merged 5 commits into from
Sep 19, 2020

Conversation

NiklasMerz
Copy link
Member

@NiklasMerz NiklasMerz commented Apr 29, 2020

Platforms affected

ios

Motivation and Context

Closes #687

Description

WIP to show what issue is talking about. See #687

Testing

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@NiklasMerz NiklasMerz linked an issue Apr 29, 2020 that may be closed by this pull request
3 tasks
Copy link
Member

@jcesarmobile jcesarmobile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've commented on the issue, it should be a preference or browser option, not default, because showing a browser user agent is an iPadOS feature, we can just disable it for everybody.

@NiklasMerz
Copy link
Member Author

I think preference totally makes sense and using this preference for the main webview, too. Changed this ways. Let me know what you think.

@NiklasMerz NiklasMerz marked this pull request as ready for review June 2, 2020 18:23
Copy link
Contributor

@dpa99c dpa99c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actual functionality works fine but I think we want to document it in the README.md so we don't end up with undocumented functionality.

Maybe a "Preferences" subsection under Installation which indicates the end user were the preference needs to live in config.xml and an example usage, e.g.

<preference name="PreferredContentMode" value="mobile" />

Also need to indicate that this preference is platform-specific to iOS.

@NiklasMerz
Copy link
Member Author

@dpa99c Thanks for the review. Yes we need to document. Since we also would need that preference in the cordova-ios platform my plan was to do the documentation in cordova-docs where the other prefrences are. The PR for cordova-ios is to be done, too.

@jcesarmobile
Copy link
Member

I agree with dpa99c, the preference is also going to work on ios and should be documented on ionic-docs for ios, but since it also works in the plugin, should be mentioned in the plugin too

@NiklasMerz NiklasMerz changed the title (ios): set "preferredContentMode" to mobile (ios): allow to set "preferredContentMode" Jun 4, 2020
@NiklasMerz
Copy link
Member Author

It makes sense to explain this a bit. I pushed an update for README.

@NiklasMerz
Copy link
Member Author

Tests are failing probably because CI uses Xcode 10 and this is new for iOS13 in Xcode 11.

@NiklasMerz NiklasMerz requested a review from dpa99c June 5, 2020 09:03
README.md Outdated Show resolved Hide resolved
@NiklasMerz NiklasMerz added this to the 4.0.0 milestone Jun 5, 2020
@NiklasMerz NiklasMerz requested a review from timbru31 June 5, 2020 09:51
Copy link
Member

@timbru31 timbru31 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Travis is still not happy. Otherwise thank & LGTM

@timbru31
Copy link
Member

timbru31 commented Jun 5, 2020

Talking about the Travis failure (https://travis-ci.org/github/apache/cordova-plugin-inappbrowser/jobs/694970579): Did the name change from iPhone-XR to
{ platform:iOS Simulator, id:4715F3CB-93A5-46AB-AAEA-D2E86B57C88B, OS:12.1, name:iPhone Xʀ }? (Around line 1698)

@NiklasMerz
Copy link
Member Author

I dont really know where iPhone-XR comes from. I will try different platforms..

@jcesarmobile
Copy link
Member

I think travis changes should go outside of this PR, probably best to sent a separate PR and once the tests are good in that PR, merge it and rebase this one

@erisu
Copy link
Member

erisu commented Jun 5, 2020

@NiklasMerz the change in CI configurations might fail because it does not exist in paramedic

- env: PLATFORM=local/ios-13.0

https://github.com/apache/cordova-paramedic/tree/master/conf/pr/local

@NiklasMerz
Copy link
Member Author

@NiklasMerz the change in CI configurations might fail because it does not exist in paramedic

- env: PLATFORM=local/ios-13.0

https://github.com/apache/cordova-paramedic/tree/master/conf/pr/local

It did fail https://travis-ci.org/github/apache/cordova-plugin-inappbrowser/jobs/694985529. I reverted that.

@NiklasMerz
Copy link
Member Author

Looks like I cannot use the Xcode 11 image with this local configuration. paramedic needs to be fixed first.

@NiklasMerz NiklasMerz mentioned this pull request Jun 5, 2020
5 tasks
@NiklasMerz NiklasMerz removed this from the 4.0.0 milestone Jun 9, 2020
@NiklasMerz NiklasMerz added this to the 4.0.1 milestone Jul 9, 2020
@NiklasMerz
Copy link
Member Author

Is this good to merge? Failing CI is a seperate issue being worked on.

Copy link
Member

@timbru31 timbru31 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two minor bits, otherwise LGTM and I think we can merge

src/ios/CDVWKInAppBrowser.m Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Co-authored-by: Tim Brust <github@timbrust.de>
@NiklasMerz NiklasMerz merged commit 46c080f into apache:master Sep 19, 2020
@NiklasMerz NiklasMerz deleted the ipad-contentmode branch November 30, 2020 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

InAppBrowser is in desktop mode on iPadOS 13
5 participants