AVCaptureDevice on simulator

matt c
2011-04-15
2013-02-02
  • matt c

    matt c - 2011-04-15

    Hello,

    I'm trying to detect if the device supports auto-focus using the following code which works on the device but on the iphone but not on the simulator running ios 4

        for (AVCaptureDevice *cameraDevice in [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]) {
            if ([cameraDevice isFocusModeSupported:AVCaptureFocusModeAutoFocus]) 
                return YES;
        }
        return NO;
    

    on the simulator, i get this error, which I don't understand since I verified the framework in the /Developer directory and zbar also uses that framework.  if anyone has any suggestions, it'd be much appreciated

    dyld: Symbol not found: _OBJC_CLASS_$_AVCaptureDevice
      Referenced from: /Users/matthewchung/Library/Application Support/iPhone Simulator/4.0.2/Applications/70448D32-8A4D-40AC-B780-878F43E567EF/Cooler.app/Cooler
      Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/AVFoundation.framework/AVFoundation
    in /Users/matthewchung/Library/Application Support/iPhone Simulator/4.0.2/Applications/70448D32-8A4D-40AC-B780-878F43E567EF/Cooler.app/Cooler

     
  • matt c

    matt c - 2011-04-15

    please excuse the typo.  the code throws the error on the simulator and not the device.

     
  • spadix

    spadix - 2011-04-16

    The simulator does not support AVCapture interfaces - they don't exist in the simulator version of AVFoundation.  The ZBar SDK works around this with a "simulated" capture interface.

    Suggest you report this problem to the vendor (as we did) if you hope to ever see it resolved.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks