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

Screenshots #364

Open
lukepighetti opened this issue Jun 2, 2023 · 1 comment
Open

Screenshots #364

lukepighetti opened this issue Jun 2, 2023 · 1 comment

Comments

@lukepighetti
Copy link

So I've used this to setup an integration testing pipeline, which I love! However, when my tests fail, I'm not easily able to see what's on the screen of the simulator at time of failure. While I understand this might be out of scope for this action, do you have any suggestions for how to handle this?

@dotdoom dotdoom self-assigned this Jun 4, 2023
@dotdoom
Copy link
Member

dotdoom commented Oct 22, 2023

I guess this would be some wrapping around xcrun screenshot or xcrun recordVideo.

Taking a screenshot should be trivial, just running the command

$ xcrun simctl io booted screenshot error.jpg

as suggested in Capture iOS Simulator video for App Preview, and then uploading it with e.g. actions/upload-artifact or an artifact uploading action of choice.

Video is likely more useful. The problem with video is that the command needs to be stopped. This can be achieved by starting xcrun in background (e.g. xcrun ... &) and then stopping it later with SIGINT (rough equivalent of Ctrl-C) via pkill -INT xcrun in an if: always() action. It's a bit hacky, so I agree providing some instructions would generally be helpful. Agreed this is a stretch for the scope, but I won't mind poking at it once I am back to iOS development. Iterative contributions also welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants