Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

Commit

Permalink
Merge pull request #423 from node-vision/master
Browse files Browse the repository at this point in the history
Fix for issue #386 - camera cras- ios 10 simulator
  • Loading branch information
rt2zz committed Sep 26, 2016
2 parents 1747ec4 + 000c09a commit 6074ec3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ios/RCTCameraManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ - (UIView *)viewWithProps:(__unused NSDictionary *)props
- (UIView *)view
{
self.session = [AVCaptureSession new];

self.previewLayer = [AVCaptureVideoPreviewLayer layerWithSession:self.session];
self.previewLayer.needsDisplayOnBoundsChange = YES;

#if !(TARGET_IPHONE_SIMULATOR)
self.previewLayer = [AVCaptureVideoPreviewLayer layerWithSession:self.session];
self.previewLayer.needsDisplayOnBoundsChange = YES;
#endif

if(!self.camera){
self.camera = [[RCTCamera alloc] initWithManager:self bridge:self.bridge];
}
Expand Down

0 comments on commit 6074ec3

Please sign in to comment.