Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OSBarcodeLib.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions OSBarcodeLib.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PackageDescription
let package = Package(
name: "OSBarcodeLib",
platforms: [
.iOS(.v14)
.iOS(.v15)
],
products: [
.library(
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@

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
- ITF-14
- 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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}()
Expand All @@ -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
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down Expand Up @@ -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.
Expand All @@ -59,10 +51,6 @@ extension View {
/// - Returns: A view that fires an action when the specified value changes.
@ViewBuilder
func valueChanged<T: Equatable>(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)
}
}
Loading