diff --git a/Example.xcodeproj/project.pbxproj b/Example.xcodeproj/project.pbxproj index 042dddb..04cc3e9 100644 --- a/Example.xcodeproj/project.pbxproj +++ b/Example.xcodeproj/project.pbxproj @@ -288,6 +288,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, Base, ); @@ -491,11 +492,11 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Example/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.aschuch.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0.1; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -504,11 +505,11 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Example/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.aschuch.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0.1; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -534,7 +535,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0.1; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -558,7 +559,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.aschuch.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0.1; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -577,7 +578,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.aschuch.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0.1; + SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example"; }; name = Debug; @@ -590,7 +591,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.aschuch.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0.1; + SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example"; }; name = Release; diff --git a/Example/AppDelegate.swift b/Example/AppDelegate.swift index 6d11608..891c29d 100644 --- a/Example/AppDelegate.swift +++ b/Example/AppDelegate.swift @@ -13,7 +13,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? = nil) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool { // Override point for customization after application launch. return true } diff --git a/QRCode.podspec b/QRCode.podspec index 0080c9f..32fa457 100644 --- a/QRCode.podspec +++ b/QRCode.podspec @@ -1,13 +1,14 @@ Pod::Spec.new do |s| s.name = "QRCode" - s.version = "2.0" + s.version = "3.0" s.summary = "A QRCode generator written in Swift." s.description = "Generate QRCodes and customize their appearance." s.homepage = "https://github.com/aschuch/QRCode" s.license = { :type => "MIT", :file => "LICENSE" } s.author = { "Alexander Schuch" => "alexander@schuch.me" } s.social_media_url = "http://twitter.com/schuchalexander" - s.platform = :ios, "8.0" + s.platform = :ios, "9.3" + s.swift_version = "5.0" s.source = { :git => "https://github.com/aschuch/QRCode.git", :tag => s.version } s.requires_arc = true s.source_files = "QRCode/QRCode.swift", "QRCode/UIImageViewExtension.swift", "QRCode/CIColorExtension.swift", "QRCode/CIImageExtension.swift" diff --git a/QRCode/CIColorExtension.swift b/QRCode/CIColorExtension.swift index 40b4435..50d959d 100644 --- a/QRCode/CIColorExtension.swift +++ b/QRCode/CIColorExtension.swift @@ -19,7 +19,7 @@ public extension CIColor { /// `aabbccff` /// /// - parameter rgba: The hex string to parse in rgba format - public convenience init(rgba: String) { + convenience init(rgba: String) { var r: CGFloat = 0.0 var g: CGFloat = 0.0 var b: CGFloat = 0.0 @@ -29,7 +29,7 @@ public extension CIColor { var hexValue: CUnsignedLongLong = 0 if scanner.scanHexInt64(&hexValue) { - let length = rgba.characters.count + let length = rgba.count switch (length) { case 3: