Filed under: iPhone
iPhone screenshot utility
Earlier today, I learned about this iPhone screen shot snippet meant to be used inside an application. It produces PDF results. After playing with the code and realizing it probably couldn't be expanded to a general purpose screenshot utility, I decided to write one from scratch by taking advantage of UIApplication's _dumpScreenContents: protocol.
Update: My daughter figured out that if you set the iPhone to never sleep and put it into camera mode, you can script it to take screen shots every minute (or five minutes or however long) to take time lapse series of images. We are so going to try this out.
Update 2: Tried it out. Only gets about 4 pictures per minute when in a loop so video is a no-go.


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


Reader Comments (Page 1 of 2)
Charlie Wood said 7:33PM on 8-03-2007
I tried this on my MacBook pro and got this error:
-bash: ./screenshot: Bad CPU type in executable
-Charlie
Reply
tristan said 7:40PM on 8-03-2007
this is obviously an iPhone app judging by the output at an attempted run on os x, so when u run it on the iPhone, via ssh i guess, where does the pdf output to... same dir?
Reply
punkassjim said 8:09PM on 8-03-2007
All due respect, Erica, I sorta share in your excitement with your hacking...
...but most of your posts these days aren't relevant to the porpose of this site. Personal exploits in hack-land, although exciting for some of the TUAW base, just don't qualify as news.
I know you're excited. But if I wanted to read about iPhone hacking, I'd find a forum or IRC channel. I know I don't speak for everyone, but the fact remains that it's kinda off-topic.
Reply
jon said 8:27PM on 8-03-2007
you guys are crazy- this is a really useful app for the iphone and will enrich the user experience
good work
Reply
ill trooper said 8:25PM on 8-03-2007
Well, you'll likely have to deal with that a little, punkassdad. I think the 'porpose' of this site is 'Apple Weblog,' so I don't mind seeing some iPhone-related things on here.
It's not off-topic at all in the context that Apple won't allow apps to be written for what is in essence their first 'tablet pc,' and everyone is into this phone, and seeing what you can do with it. This isn't an unofficial 'mac' site, after all, it's an unofficial 'Apple' site.
Reply
Eleventeen said 9:07PM on 8-03-2007
I'm glad there's some punk ass out there that thinks that he runs this place.
To Erica and the rest of TUAW: keep up the good work, this site rocks.
Reply
Edsel said 9:28PM on 8-03-2007
Yikes!
With all of the splendid talent in the Sadun household, let their guests be forewarned!
LOL! Nice work.
Reply
tristan said 9:43PM on 8-03-2007
in response to punkassholejim..... i think someone is a little sore that they cant afford an iPhone.... or can't comprehend a little activity with the terminal.... in any event.. good job erica
keep on keepin' on
Reply
Reg Muffet said 10:18PM on 8-03-2007
punkassjim > "most of your posts these days aren't relevant to the purpose of this site."
But they are...
This blog is called "The Unofficial Apple Weblog."
iPhone is an Apple product.
Hacking in unofficial.
Erica is a TUAW writer who also happens to be a phreaking goddess.
I for one welcome our iPhone-hacking goddess overlords!
Reply
tristan said 11:20PM on 8-03-2007
hey erica, whats the best way to get the pic off the iPhone... it doesn't wanna behave for me
Reply
tristan said 11:25PM on 8-03-2007
oh and also whats the best place to place screenshot.... that could cause me problems too
Reply
Dark Meth said 11:48PM on 8-03-2007
Awesome solution! Can you please set by step guide on how to use this tool?
Thanks..
Reply
icruise said 1:19AM on 8-04-2007
Until these programs can actually be used by people who don't want to hack their iPhones, I'm inclined to agree with the people who say that we probably don't need news items about every little development like this. There's not even any indication in the article that this is not a program that you can just download and run if you're not fairly serious about hacking. When I saw this and the one entitled "Journeys inside the iPhone's SDK" I thought for a minute that Apple had released an SDK and I had missed it. She goes on about how "Apple makes amazing, usable libraries" without mentioning that the SDK she's talking about isn't Apple's at all, and then fills the rest of the article with language that you have to be a programmer to understand. I'm not saying that it isn't interesting, but I'm not sure that it belongs with the rest of the news that makes up TUAW's usual posts.
Reply
Hawke said 1:58AM on 8-04-2007
I'm inclined to agree with the people who say that we probably absolutely do need news items about every little development like this.
Very cool, keep up the good work and keep us posted!
Reply
Danny Zumwalt said 3:36AM on 8-04-2007
ALL:
This site is "The Unofficial APPLE Weblog" -- not "The Unofficial MAC Weblog". iPhone = Apple. Stop your griping!
Reply
leobolin said 5:36AM on 8-04-2007
Hey, bash her when she writes stupid things instead. This was actually really interesting.
Reply
Gerard Braad said 5:54AM on 8-04-2007
@Charlie
The CPU in the iPhone is of a completely different architecture. You can't run the iPhone executable without a way of emulating the ARM-based CPU.
http://en.wikipedia.org/wiki/IPhone#OS_X
Reply
winandmac said 6:14AM on 8-04-2007
Ah... Any steps to install this cool program in my iPhone? I don't know much about ssh... But know how to jailbreak. How to get it work?
Reply
Mo said 6:42AM on 8-04-2007
Here, when TUAW bloggers start producing homebrew for the iPhone, you know it's gone mainstream :-)
Good stuff, Erica!
Reply
ash said 6:44AM on 8-04-2007
I agree, keep up the good work Erica!
Reply