I am trying to acquire the surface associated with the main screen of the ios device, create an image out of it and save it. This is in relevance to this question - Ta
The specified code works if you run it in the background. It does take screenshot of the topmost surface on the display of iOS device.
The problem faced was due to the fact that inside the app, it was taking screenshot of the blank view created for the app.
However, you have to take the screenshots at minimum intervals of 2 sec otherwise the OS suspends your app. Any suggestions on how to improve that will be helpful.