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 17 - fix black screenshots after using a keyboard #1289

Conversation

banjun
Copy link
Contributor

@banjun banjun commented Oct 4, 2023

On iOS 17 Simulator, we cannot render a keyboard window and get a fully black screenshot image.
As a workaround, this PR suppress rendering the keyboard window

conditions for reproduce

  • call writeScreenshotForLine after using a keyboard
    • the keyboard window renders black pixels even when the keyboard is hidden on iOS 17 Simulator

iOS 16.4 Simulator does not reproduce the issue, for both builds on Xcode 14.3.1 or Xcode 15.0. It seems to depend on the runtime simulator version.

expected result

Either the keyboard window is not rendered, or, it renders the keyboard image over the app window as same as displayed on the Simulator

actual result

a fully black screenshot image will be rendered

@justinseanmartin
Copy link
Contributor

Thanks for the contribution! The CI failures look unrelated and the change itself seems benign, given that we've never been able to render the keyboard window into the captured screenshots. I'll wait to see if anything else falls out of the Xcode 15 bump that needs to be merged before cutting a release. In the meantime, hopefully pointing at HEAD of master is fine. I'll plan to cut a release in a week or two, but feel free to poke me if I forget.

@justinseanmartin
Copy link
Contributor

It seems there are some reliability issues on Xcode 14.1 running the WebViewTests testScrolling test. I'm kicking the CI pipeline one more time. 🤞

@justinseanmartin justinseanmartin merged commit c18a19b into kif-framework:master Oct 11, 2023
5 checks passed
@banjun banjun deleted the fix-ios17-black-screenshot-due-to-keyboard branch October 12, 2023 07:26
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.

2 participants