takepicture() vs UIGetScreenImage()

2019-01-26 14:55发布

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?

7条回答
不美不萌又怎样
2楼-- · 2019-01-26 15:37

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.

查看更多
做自己的国王
3楼-- · 2019-01-26 15:41

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

查看更多
相关推荐>>
4楼-- · 2019-01-26 15:42

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

查看更多
你好瞎i
5楼-- · 2019-01-26 15:48

"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.

查看更多
做自己的国王
6楼-- · 2019-01-26 15:57

Something should be updated now ?

UIGetScreenImage should be legal now.

查看更多
▲ chillily
7楼-- · 2019-01-26 16:00

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

查看更多
登录 后发表回答