Filed under: iPhone, App Store, SDK, iPod touch, Jailbreak/pwnage
Developers now can use private API for screen capture on iPhone, says Apple
As Apple seems to be lightening up and accepting more applications using private APIs (including Ustream and others that stream video from the iPhone 3G), word comes that the review team is now officially allowing the UIGetScreenImage() function to be used in applications distributed in the App Store.An Apple forum moderator stated in the developer forums:
Apple also states "that a future release of iPhone OS may provide a public API equivalent of this functionality." It's also noted that "At such time, all applications using UIGetScreenImage() will be required to adopt the public API.""After carefully considering the issue, Apple is now allowing applications to use the function UIGetScreenImage() to programmatically capture the current screen contents." The function prototype is as follows:
CGImageRef UIGetScreenImage();
This function, which is a part of the Core Graphics framework, allows an application access to what's being currently being displayed on the screen. It's useful for things like capturing a screen shot, as our own Erica Sadun's BETAkit does to allow developers to send screen shots to a developer. It also allows streaming video from the iPhone camera, as an application like this captures what's being displayed on the screen from the camera, and records it or sends it somewhere.
What other features devs are hoping to see opened up? There's things like general calendar access, Core Surface, and XMPP and app-settable timers that developers would like to take advantage of in their SDK apps.
I hope this is a sign of what's to come for the iPhone SDK, and that we'll see more things like this opened up soon for App Store distribution.
[via the Apple Developer Forums, dev membership required]



![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 1)
Seth Rubenstein said 7:58PM on 12-15-2009
I hope this is a sign of Apple's willingness to respond mid OS life cycle to user demands.
Now if only we could add developer access to spotlight, and the lock screen.
Reply
dagamer43 said 8:05PM on 12-15-2009
At this point, new API access will probably have to wait for a developer event in March. No doubt there are still a few problems that could be solved such as:
1) Syncing app data between an iPhone and a desktop program
2) Calendar access
3) Universal To-Do list
4) Universal Notes
5) Live icons (ala the Calendar app) - change icon for different reasons
6) AddressBook API: needs a privacy notification, right now apps have full access without a user knowing it. Too easy to access names and numbers. Additionally, a Setting to turn off all AddressBook requests just like Location Services.
Developer-wise, these are something of the things I hope Apple puts into iPhone OS 4.0.
Reply
mitch_n said 8:18PM on 12-15-2009
It's an interesting predicament. We have had two updates allowed through that use a non-public API with the request that we 'fix' it in our next update. However our new app gets rejected that uses the same API.
Then they also complain about the fact we don't tell a user we submit their user data to a server. How else does a user play an online multiplayer game? By not talking to the server and playing a magical, mythical multiplayer game? It's ridiculous.
Reply
Zak said 8:58PM on 12-15-2009
Sounds like they meant you're not telling the user up front that you're submitting their data to a server. Not every time the game needs to transmit data. Do you have a disclaimer about that on the landing screen for the game?
rhodesy22 said 8:54PM on 12-15-2009
I'd like to know if using private API is technically illegal under their terms for enterprise users.
Reply
Graham Miller said 9:37PM on 12-15-2009
i wonder if this could be used to create a screencasting app, for jailbroken iphones? basically take ~15 screenshots a second and merge it into a video
Reply
Dimitris said 6:57AM on 12-16-2009
Thanks for this post - very useful.
Reply
Benoit said 6:20AM on 12-16-2009
This is the function that allows "live" barcode scanning on the iPhone.
Apps like pic2shop have used it, and it has been tolerated by Apple for a while. It's great that it is now official. We don't need that kind of uncertainty each time we submit an update!
Reply
Zeno Davatz said 6:42AM on 12-16-2009
Yeah! Just had a discussion with Benoit on the Phone! Good that you can confirm that Benoit! Obviously RedLaser uses the same function.
Reply