5

I'm trying to build a QRCodeReader for a project our research group is working on for the iPhone. After much research I found the program called QuickMark. This program scans automatically for QRCodes. What it appears to do is load the UIImagePicker and read off data from the camera. I suspect it is using UIGetScreenImage and taking a screenshot from the camera and decoding it.

Now I tried using the new takepicture() method from the 3.1 iPhone API but that seems not to be able to do what the above does which is take photos every second or so, silently. Now I had heard that UIGetScreenImage is perhaps not legal and that Apple will turn around and deny access to your App if they use it. So, my questions are:

a) Is Quickmark (or any other allowed app) using UIGetScreenImage() and if so, is it legal and,

b) would it be possible for takepicture() method to do the same sort of thing?

Kapil Choubisa
  • 5,152
  • 9
  • 65
  • 100
Oni
  • 652
  • 2
  • 9
  • 22

7 Answers7

2

"Legal" is a really vague term, but I think what you mean is would the app get denied. There is a laundry list of things that could cause app denial, but one of the grayest of gray areas is the use of private headers. Google got away with it in their search app, but the internet was ablaze in fury for a few months while people wrote very sternly worded blog entrys. Bottom line, you can do whatever you want, but if you get caught, good luck to you.

The APIs pretty much work the way they work, it should be simple enough to loop a call to takepicture with a NSTimer just be careful with how you do it, seems like a heavy handed process to me.

slf
  • 22,595
  • 11
  • 77
  • 101
  • The TakePicture call isn't really silent and doesn't do very much useful for this app; if it could be made silent and not move to the move/scale screen (etc) then that'd be great. My concern is that QuickMark appear to have gotten away with it as I can't see another way around this. – Oni Oct 09 '09 at 10:46
  • 1
    Yes, by legal I meant "approved for App store use by the Draconian gods of Apple" ;) – Oni Oct 09 '09 at 10:47
  • Spoke with an Apple representative at the recent Tech Talks... he reckoned takePicture wasnt fast enough – Oni Nov 13 '09 at 15:43
  • 3
    Apple has started allowing the use of this API, there was an official announcement on the support formats. See the uStream app. – Glenn Howes Dec 22 '09 at 14:33
  • 2
    Yes, it's official - you can use UIGetScreenImage() now. I guess Apple was shamed into it after allowing the ustream thing. https://devforums.apple.com/message/149553#149553 Pat – Pat Niemeyer Jan 11 '10 at 03:56
  • 1
    And now it's officially denied again: http://www.tuaw.com/2010/07/21/devsugar-rip-uigetscreenimage/ NOTE: this replaced an older comment saying there was a 3.x alternative. Apple's [alternative](http://developer.apple.com/iphone/library/qa/qa2010/qa1703.html) explicitly states it does NOT work with video content. – Chris R. Donnelly Jul 23 '10 at 15:33
  • The back and forth on this sends mixed messages to developers, makes things unnecessarily frustrating. I do think AV foundation is going in the right direction now – slf Jul 25 '10 at 13:52
1

You will get your app rejected for using UIGetScreenImage().

  • That cannot be right then as I am almost 100% sure that RedLaser and Quickmark use this technique. Really, I need to get this confirmed from either of these two companies but no-one seems to be able to. – Oni Oct 14 '09 at 15:15
1

RedLaser is definitely using UIGetScreenImage(). A quick glance at the symbols in their library confirms it.

acoward
  • 240
  • 3
  • 8
0

My app was rejected (today) for using this call. :( I'm searching for a new solution as I type ...

jamey
  • 301
  • 1
  • 3
  • 6
  • I've noticed that RedLaser uses a similar technique as well yet their app has been allowed. There has to be a standard technique to this – Oni Oct 09 '09 at 13:19
  • at launch they let just about anything in, now I think they have staffed up and they are tightening down on enforcing the rules. the rules have always been there, I just think now they are paying more attention – slf Oct 09 '09 at 13:21
  • As mentioned above and below, Redlaser and Quickmark have both figured out how to do this so there must be a legal way to capture the screen. Calling takePicture does not work because it plays a sound each time a picture is taken and (i believe) the calls didFinishPickingMediaWithInfo with the picture (which seems hard to manage in a thread trying to process images). UIGetScreenImage did the trick ... now what?! – jamey Oct 09 '09 at 17:00
  • I have spoken with the Apple App Review folks & DTS. They are NOT allowing any apps with UIGetScreenImage and have taken note of the ones that appear to use it. They need to level the playing field and either remove the apps that use it or allow the rest of us the same privilage allowed to Quickmark, Redlaser, QRapp, i-nigma and others. – jamey Oct 22 '09 at 17:15
0

http://www.redlaser.com/SDK.aspx

Here they are hinting at having used this function, with reference to this page.

SuP
  • 1
0

Something should be updated now ?

UIGetScreenImage should be legal now.

Forrest
  • 122,703
  • 20
  • 73
  • 107
0

There is a way to capture video data from camera without using UIImagePickerController or UIGetScreenImage().
It is available since iOS 4.0 in AVFoundation Framework. see here how.

krafter
  • 1,425
  • 1
  • 15
  • 28