AVFoundation imported but AVCaptureDeviceInput not found?

I am ashamed to admit defeat but it is Friday and I am tired.

I have been trying to use some code I found on the Unity website here: http://forum.unity3d.com/viewtopic.php?p=300819 to get data from the camera, but I am getting weird compile errors that scare me because I haven’t done much iPhone stuff.

#include "ofMain.h"  
#include "ofxiPhone.h"  
#include "ofxiPhoneExtras.h"  
#include <AVFoundation/AVFoundation.h>  
class testApp : public ofxiPhoneApp {  
	void setup();  
	void update();  
	void draw();  
	void exit();  
	void touchDown(ofTouchEventArgs &touch);  
	void touchMoved(ofTouchEventArgs &touch);  
	void touchUp(ofTouchEventArgs &touch);  
	void touchDoubleTap(ofTouchEventArgs &touch);  
	void lostFocus();  
	void gotFocus();  
	void gotMemoryWarning();  
	void deviceOrientationChanged(int newOrientation);  
	AVCaptureDeviceInput* captureInput;  

The only error is:

In file included from /Users/jeff/Documents/oF 0061 iPhone/apps/NoLogoPhoto/emptyExample/src/main.mm:2:  
/Users/jeff/Documents/oF 0061 iPhone/apps/NoLogoPhoto/emptyExample/src/testApp.h:26: error: ISO C++ forbids declaration of 'AVCaptureDeviceInput' with no type  
/Users/jeff/Documents/oF 0061 iPhone/apps/NoLogoPhoto/emptyExample/src/testApp.h:26: error: expected ';' before '*' token  

Meaning that it found AVFoundation.h just fine. Of course I have imported the framework and I am compiling for Simulator 4.0

AVFoundation.h includes AVCaptureInput.h, which has @interface AVCaptureDeviceInput : AVCaptureInput, so it should know about AVCaptureDeviceInput, right?

Any thoughts?

Oh, PS: I tried using this code in a fresh OpenGL ES iPhone project in XCode and I get the same errors.

In case anyone else has this problem:

The issue was that AVCaptureDeviceInput only exists on the device - not on the simulator. Stupid thing to overlook, but I thought they were identical.