3

I have made an iPhone app with a camera view as main functionality. It processes the camera images trough OpenGL, so I can modify the frames. When I test my app, it works fine(I have a iPhone 4s Ios 5.1 in the Netherlands), but when I upload it to the appstore for review it's denied. They say the camera view doesn't work, and that they get just a black screen. I really don't know what to do, because it works fine for me. I can't reproduce the error.

Is there someone who had the same problem like me? Or someone who knows what to do?

Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982
Ruud Visser
  • 121
  • 1
  • 4

2 Answers2

3

You don't say whether you use OpenGL ES 2.0 to do this, but if you do, it's possible they tested your application on an iPhone 3G, which lacks 2.0 support. You can filter out those unsupported devices by adding the opengles-2 key to your UIRequiredDeviceCapabilities in your Info.plist.

A second possibility is that you are trying to display an image from your camera that exceeds the max OpenGL ES texture size of the tester's device. You can check this size, but on devices older than the iPad 2, this max texture size is 2048x2048. On the iPad 2, new Retina iPad, and iPhone 4S, that texture size is 4096x4096. The iPhone 4 can capture images that are more than 2048 pixels wide, which might explain why your camera view works on your iPhone 4S, but shows a black image on older hardware.

There's also a remote possibility that you're using an OpenGL ES extension that doesn't exist on that older hardware, but I don't think any of the recent additions in the A5 chips would be useful for image processing. I think the newer hardware also supports a greater number of texture units, attributes, and varyings, but I'd need to check on that.

This is why I always try to test on the oldest hardware that has the minimum capabilities I need in my applications, because there are subtle variations in the way the different device GPUs handle things.

Community
  • 1
  • 1
Brad Larson
  • 170,088
  • 45
  • 397
  • 571
  • First of all thanks for the reaction. I found the problem, it doesnt work on a iphone 4, but does on a iphone 4s. I get the error:failed to load vertex shader, which indicates that the shader is not found. But it is found on an iphone 4s. Any idea what this can be? – Ruud Visser Mar 28 '12 at 22:44
0

I did not inlcude the framework, on an iphone 4s this was not necessary, it was on an iphone 4...

Ruud Visser
  • 121
  • 1
  • 4