Skip to Content

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:
"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();
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."

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]

As Apple seems to be lightening up and accepting more applications using private APIs (including Ustream and others that stream video from...
 

Add a Comment

*0 / 3000 Character Maximum

9 Comments

Filter by:
Zeno Davatz

Yeah! Just had a discussion with Benoit on the Phone! Good that you can confirm that Benoit! Obviously RedLaser uses the same function.

December 16 2009 at 6:42 AM Report abuse rate up rate down Reply
Benoit

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!

December 16 2009 at 6:20 AM Report abuse rate up rate down Reply
Dimitris

Thanks for this post - very useful.

December 16 2009 at 6:06 AM Report abuse rate up rate down Reply
Graham Miller

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

December 15 2009 at 9:37 PM Report abuse rate up rate down Reply
rhodesy22

I'd like to know if using private API is technically illegal under their terms for enterprise users.

December 15 2009 at 8:53 PM Report abuse rate up rate down Reply
mitch_n

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.

December 15 2009 at 8:17 PM Report abuse rate up rate down Reply
1 reply to mitch_n's comment
xaqtly

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?

December 15 2009 at 8:58 PM Report abuse rate up rate down Reply
dagamer43

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.

December 15 2009 at 8:05 PM Report abuse rate up rate down Reply
Seth Rubenstein

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.

December 15 2009 at 7:57 PM Report abuse rate up rate down Reply
Buy an ad here

Hot Apps on TUAW

Tweets

© 2012 AOL Inc. All Rights Reserved.