Vra

May i know whether all iOS 6 installed devices (iPad, iPhone and iPod) should have camera?

Thanks!

Was dit nuttig?

Oplossing

If your app requires the presence of a camera (ie it won't work or has no useful functions without a camera) then you can specify the camera as a required device capability

This will prevent the app from installing on devices that do not have a camera

Ander wenke

#import <AVFoundation/AVFoundation.h>

NSArray *videoHardwareDevices = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo];

if ( [videoHardwareDevices count] > 0 ){


    NSLog(@"YES I have camera");

}
else{

    NSLog(@"NO camera");
}
Gelisensieer onder: CC-BY-SA met toeskrywing
Nie verbonde aan StackOverflow
scroll top