fix crash on simulator when try to changeCamera to rear camera

This commit is contained in:
Ran Greenberg 2017-06-20 11:28:50 +03:00
parent 36fd36bd38
commit 118bb01160
2 changed files with 5 additions and 1 deletions

View File

@ -564,6 +564,10 @@ RCT_ENUM_CONVERTER(CKCameraZoomMode, (@{
-(void)changeCamera:(CallbackBlock)block
{
#if TARGET_IPHONE_SIMULATOR
NSLog(@"changeCamera isn't support on simulator");
return;
#endif
dispatch_async( self.sessionQueue, ^{
AVCaptureDevice *currentVideoDevice = self.videoDeviceInput.device;

View File

@ -14,7 +14,7 @@
#import "CKGalleryManager.h"
#import "CKGalleryViewManager.h"
#import "CKCompressedIMage.h"
#import "CKCompressedImage.h"
typedef void (^AlbumsBlock)(NSDictionary *albums);