2

I am writing a piece of code using swift for iOS.

It’s using location services. I need to take a screenshot of the current screen every time the location gets updated.

The thing is when the app is running in background and updating the location the screenshots taken are from my app. Not the app which is currently available in the screen.

Assume that the user plays a game in their phone. But my app run in background and updating the location when the users location is significantly changed the screenshot should be taken and it should include the game. Not my app screen.

Can some one tell me how to achieve the screenshot capability I want.

1
  • 4
    I certainly hope that isn't possible. Commented Aug 13, 2019 at 1:36

1 Answer 1

5

Short answer: You can't.

Apps can only take screenshots of their own content. Starting with (I think) iOS 7 Apple blocked the ability of apps to take screenshots of anything but their own content. This is for security reasons.

Imagine your app echoes each character of your password as you type it, and then replaces it with a bullet as you type the next character. Now imagine an app that runs in the background and takes a screen-shot every time your app displays a new character of the user's password.

Sign up to request clarification or add additional context in comments.

5 Comments

But what about the touch assist feature taking screenshots of any app? Is it because it’s implemented by apple that it can access all applications?
what about screen recording? Is it impossible too? To record other apps? Atleast maybe 3 seconds?
Apple is able to take screenshots of any app and provide those screenshots to the user. What's blocked is apps taking screenshots/videos of other apps that they then have access to.
Any idea about screen recording of other apps?
Not possible. At least not in a way your app will have access to.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.