I made a quick fix for bug 1144683 - Feedback screenshot is empty, that uses a different method of taking a screenshot. This works except that the status bar is not included. I think it would be nice if we can fix that.
Created attachment 8699169 [details] [review] Pull request The only way I found for including the status bar in the screenshot is using UIScreen's snapshotViewAfterScreenUpdates method. However, while testing on the simulator I saw a few graphical glitches (see attached screenshots). It could be a simulator thing but, unfortunately, I cannot verify this assumption as I cannot build to a device due to missing provisioning profiles. Generally, using UIWindow's drawViewHierarchyInRect method did produce better results on the simulator (but without including the status bar). I also tried to combine both approaches by rendering on top of each other but this breaks in a multi-tasking scenario because there seems to be no way to determine the application windows' position on the screen (snapshotViewAfterScreenUpdates will capture the whole screen and the window could be in the left or right pane).
We can test this PR branch on a few devices to see how it works there. We all also have 8.x devices too. Aaron, do you have the ability to run this on a device and see if it makes a difference?
The code looks fine. Just want to be sure it makes an actual difference.
Hennes, I just tried on my iPhone 6s and the screenshot is completely blank. Not sure what is going on there. Looping in :sleroux because he may remember some of the details of screenshotting when he did the first version of this.
Comment on attachment 8699169 [details] [review] Pull request Switching reviewers.
I'm seeing the feedback image blank as well on my iPhone 6. Not sure what's causing it though. When I first implemented the screenshot logic I don't remember having a reason for using snapshotViewAfterScreenUpdates over drawViewHierarchy in rect. Actually I don't remember if the status bar was showing in the first implementation or not.
Saw the same
Sorry, I forgot to add myself to the CC list so I didn't get any update notifications on this ticket. It's weird that it doesn't work at all on the device but at least to some extent on the simulator. I guess using snapshotViewAfterScreenUpdates is not a valid option then. :(
Hey hennes, Did you still want to work on this? I was going to mark the current PR as obsolete if you wanted to give it another go.
Stephan, sorry, I'm currently out of ideas here. The current PR is definitely obsolete because it doesn't seem to work at all on a device. I'm not aware of any other options, sadly.