From 3ee9c8e974b6ace07ca643c13a43cb31e71b5f7a Mon Sep 17 00:00:00 2001 From: Chris Combs Date: Thu, 20 Oct 2016 14:48:57 +0200 Subject: [PATCH] Fixing iOS 8 issue --- QRIO.xcodeproj/project.pbxproj | 4 ++-- QRIO/QRIO.swift | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/QRIO.xcodeproj/project.pbxproj b/QRIO.xcodeproj/project.pbxproj index 07f3fc8..c3a0d70 100644 --- a/QRIO.xcodeproj/project.pbxproj +++ b/QRIO.xcodeproj/project.pbxproj @@ -260,7 +260,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -303,7 +303,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; diff --git a/QRIO/QRIO.swift b/QRIO/QRIO.swift index e723506..617252f 100644 --- a/QRIO/QRIO.swift +++ b/QRIO/QRIO.swift @@ -8,6 +8,7 @@ import UIKit import AVFoundation +import CoreImage public class QRInput: NSObject, AVCaptureMetadataOutputObjectsDelegate { private var session: AVCaptureSession? @@ -97,7 +98,7 @@ public extension UIImage { } let qrImage = resultImage.imageByApplyingTransform(CGAffineTransformMakeScale(scaleX, scaleY)) - let context = CIContext(options: nil) + let context = CIContext() if let tempImage: CGImageRef = context.createCGImage(qrImage, fromRect: qrImage.extent) { return UIImage(CGImage: tempImage) }