1

Before iOS7 I use UIGetScreenImage() to take screenshot of the entire screen at any view of the iOS, not only inside my tweak app but also views of other apps.

In iOS7, when I use this function I got implicit declaration of function error, then I added a prototype in the code as blow, this error disappeared, but got ld: symbol(s) not found for architecture arm64 error. It looks like 'UIGetScreenImage' has been deleted in iOS7, is it? If so, what can I do to replace it?

CGImageRef UIGetScreenImage(void);
Suge
  • 2,808
  • 3
  • 48
  • 79
  • `UIGetScreenImage` was exposed briefly because of the accidental approval of a hit app that used it and a general sense of unfairness that followed; it became private API again in iOS 6. Even if you use it under 6 you're likely to get a rejection. – Tommy Mar 19 '14 at 22:54

3 Answers3

4

I don't see UIGetScreenImage() in Apple's documentation. For iOS 7 there's a new method:

-[UIScreen snapshotViewAfterScreenUpdates:] -- see the UIScreen documentation.

Similarly, there is a -[UIView snapshotViewAfterScreenUpdates:] method -- see the UIView documentation.

bneely
  • 9,083
  • 4
  • 38
  • 46
  • This method can only be used in my app, but I want to take screenshot for any view including other apps.In fact, my app is a tweak inside `SpringBoard`. – Suge Feb 08 '14 at 02:14
1

This private API function was removed from the iOS 7 64-bit SDK but still exists in the 32-bit version. I just ran it via the simulator.

bgfriend0
  • 1,152
  • 1
  • 14
  • 26
0

The UIGetScreenImage() is removed in IOS 7.

You can use the following for screenshot purposes:

snapshotViewAfterScreenUpdates:

drawViewHierarchyInRect:afterScreenUpdates:

resizableSnapshotViewFromRect:afterScreenUpdates:withCapInsets

Lexicon
  • 473
  • 1
  • 3
  • 15
  • This method can only be used in my app, but I want to take screenshot for any view including other apps.In fact, my app is a tweak inside `SpringBoard`. – Suge Feb 08 '14 at 02:15
  • You might want to check the following discussion: http://stackoverflow.com/questions/13833816/taking-screenshots-from-ios-app-emulating-display-recorder-query-on-the-inter – Lexicon Feb 08 '14 at 18:02