From 3a7760f9f6475ae271fa0f04751f1e077e358dcd Mon Sep 17 00:00:00 2001 From: Bryant Luk Date: Wed, 27 Apr 2016 11:26:59 -0500 Subject: [PATCH] Ensure previewLayer is the right type depending on build - See https://github.com/card-io/card.io-iOS-source/pull/63 --- Classes/CardIOVideoStream.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Classes/CardIOVideoStream.mm b/Classes/CardIOVideoStream.mm index e46cd9fd..3b3e4ed3 100644 --- a/Classes/CardIOVideoStream.mm +++ b/Classes/CardIOVideoStream.mm @@ -144,7 +144,11 @@ @interface CardIOVideoStream () @property(nonatomic, assign, readwrite) BOOL wasRunningBeforeBeingBackgrounded; @property(nonatomic, assign, readwrite) BOOL didEndGeneratingDeviceOrientationNotifications; @property(assign, readwrite) UIInterfaceOrientation interfaceOrientation; // intentionally atomic -- video frames are processed on a different thread +#if SIMULATE_CAMERA @property(nonatomic, strong, readwrite) CALayer *previewLayer; +#else +@property(nonatomic, strong, readwrite) AVCaptureVideoPreviewLayer *previewLayer; +#endif @property(nonatomic, strong, readwrite) AVCaptureSession *captureSession; @property(nonatomic, strong, readwrite) AVCaptureDevice *camera; @property(nonatomic, strong, readwrite) AVCaptureDeviceInput *cameraInput;