diff --git a/OSBarcodeLib.podspec b/OSBarcodeLib.podspec index 6d14e58..8062ded 100644 --- a/OSBarcodeLib.podspec +++ b/OSBarcodeLib.podspec @@ -14,6 +14,6 @@ Pod::Spec.new do |spec| spec.source = { :http => "https://github.com/OutSystems/OSBarcodeLib-iOS/releases/download/#{spec.version}/OSBarcodeLib.zip", :type => "zip" } spec.vendored_frameworks = "OSBarcodeLib.xcframework" - spec.ios.deployment_target = '13.0' + spec.ios.deployment_target = '15.0' spec.swift_versions = ['5.0', '5.1', '5.2', '5.3', '5.4', '5.5', '5.6', '5.7', '5.8', '5.9'] end diff --git a/OSBarcodeLib.xcodeproj/project.pbxproj b/OSBarcodeLib.xcodeproj/project.pbxproj index 491ef43..4ba2864 100644 --- a/OSBarcodeLib.xcodeproj/project.pbxproj +++ b/OSBarcodeLib.xcodeproj/project.pbxproj @@ -664,7 +664,7 @@ GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -704,7 +704,7 @@ GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/Package.swift b/Package.swift index a502a1d..dcd9dec 100644 --- a/Package.swift +++ b/Package.swift @@ -4,7 +4,7 @@ import PackageDescription let package = Package( name: "OSBarcodeLib", platforms: [ - .iOS(.v14) + .iOS(.v15) ], products: [ .library( diff --git a/README.md b/README.md index 5a85613..f9f2c97 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ The `OSBarcodePluginLib-iOS` is a library built using `Swift` that offers you a barcode scanner for your iOS application. Supports many popular encoding types of 1D and 2D barcodes, such as: - 1D Barcodes - - Codabar (*available from iOS 15.0 onwards*) + - Codabar - Code 39 - Code 93 - Code 128 - - Databar (GS1) (*available from iOS 15.0 onwards*) + - Databar (GS1) - EAN-8 - EAN-13 - ITF @@ -14,14 +14,14 @@ The `OSBarcodePluginLib-iOS` is a library built using `Swift` that offers you a - ISBN-10 - ISBN-13 - ISBN-13 Dual Barcode - - RSSExpanded (*available from iOS 15.0 onwards*) + - RSSExpanded - UPC-A - UPC-E - 2D Barcodes - Aztec Code - Data Matrix - - Micro PDF 417 (*available from iOS 15.0 onwards*) - - Micro QR (*available from iOS 15.0 onwards*) + - Micro PDF 417 + - Micro QR - PDF 417 - QR Code diff --git a/Sources/OSBarcodeLib/Scanner/Extensions/OSBARCScannerHint+VNBarcodeSymbology.swift b/Sources/OSBarcodeLib/Scanner/Extensions/OSBARCScannerHint+VNBarcodeSymbology.swift index 03a6fe3..9db9617 100644 --- a/Sources/OSBarcodeLib/Scanner/Extensions/OSBARCScannerHint+VNBarcodeSymbology.swift +++ b/Sources/OSBarcodeLib/Scanner/Extensions/OSBARCScannerHint+VNBarcodeSymbology.swift @@ -41,11 +41,9 @@ extension OSBARCScannerHint { .upcE: [.upce] ] - if #available(iOS 15.0, *) { - result[.codabar] = [.codabar] - result[.rss14] = [.gs1DataBar] - result[.rssExpanded] = [.gs1DataBarExpanded] - } + result[.codabar] = [.codabar] + result[.rss14] = [.gs1DataBar] + result[.rssExpanded] = [.gs1DataBarExpanded] return result }() @@ -56,9 +54,7 @@ extension OSBARCScannerHint { private var allBarcodeTypes: [VNBarcodeSymbology] { var result = Self.hintMappings.values.flatMap { $0 } - if #available(iOS 15.0, *) { - result += [.microPDF417, .microQR] - } + result += [.microPDF417, .microQR] return result } } diff --git a/Sources/OSBarcodeLib/Scanner/Extensions/View+CustomModifiers.swift b/Sources/OSBarcodeLib/Scanner/Extensions/View+CustomModifiers.swift index 114ce2b..a9b4152 100644 --- a/Sources/OSBarcodeLib/Scanner/Extensions/View+CustomModifiers.swift +++ b/Sources/OSBarcodeLib/Scanner/Extensions/View+CustomModifiers.swift @@ -7,11 +7,7 @@ extension View { /// - Returns: The resulting view. @ViewBuilder func foregroundStyle(forColour colour: Color) -> some View { - if #available(iOS 15.0, *) { - self.foregroundStyle(colour) - } else { - self.foregroundColor(colour) - } + self.foregroundStyle(colour) } /// Applies the given transform if the given condition evaluates to `true`. @@ -45,11 +41,7 @@ extension View { /// - Returns: the View ignoring all safe areas. @ViewBuilder func customIgnoreSafeArea() -> some View { - if #available(iOS 14.0, *) { - self.ignoresSafeArea() - } else { - self.edgesIgnoringSafeArea(.all) - } + self.ignoresSafeArea() } /// Adds a modifier for this view that fires an action when a specific value changes. @@ -59,10 +51,6 @@ extension View { /// - Returns: A view that fires an action when the specified value changes. @ViewBuilder func valueChanged(value: T, _ onChange: @escaping (T) -> Void) -> some View { - if #available(iOS 14.0, *) { - self.onChange(of: value, perform: onChange) - } else { - self.onReceive(Just(value)) { onChange($0) } - } + self.onChange(of: value, perform: onChange) } }