Closed kputters6 closed 11 years ago
Try this, I think just the deviceSupportsAR call does not support the simulator
{
#if !TARGET_IPHONE_SIMULATOR
// Go thru and see if the device supports Video Capture.
NSArray *devices = [AVCaptureDevice devices];
BOOL suportsVideo = NO;
if (devices != nil && [devices count] > 0) {
for (AVCaptureDevice *device in devices) {
if ([device hasMediaType:AVMediaTypeVideo]) {
suportsVideo = YES;
break;
}
}
}
if (!suportsVideo)
return NO;
//TODO: Check to see if Device supports the Gyroscope (iPhone4 and higher)
if(![CLLocationManager headingAvailable]){
return NO;
}
return YES;
#else
return YES;
#endif
}
The reason is the updated version uses AVCaptureDevice that is not supported on iOS simulator (at least I could not get it to work)
The original project should be able to run on the simulator. The original does this. Was this removed due to a memory leak?