Skip to content

Commit

Permalink
Merge pull request #1 from EdgarDegas/develop
Browse files Browse the repository at this point in the history
fix support for macOS
  • Loading branch information
EdgarDegas authored Mar 28, 2024
2 parents b39a8cc + 9be62c6 commit 1810cf4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Sources/DSBridge/Error/ErrorLogging.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public final class ErrorLogger: ErrorLogging {

public func logMessage(_ message: String, at level: OSLogType, into category: String?) {
let category = category ?? ""
if #available(iOS 14.0, *) {
if #available(iOS 14.0, macOS 11.0, *) {
let logger = getOrCreateLogger(by: category)
logger.log(level: level, "\(message)")
} else {
Expand All @@ -52,7 +52,7 @@ public final class ErrorLogger: ErrorLogging {
}
}

@available(iOS 14.0, *)
@available(iOS 14.0, macOS 11.0, *)
private func getOrCreateLogger(by category: String) -> Logger {
loggerByCategory[
category,
Expand Down
2 changes: 1 addition & 1 deletion Sources/DSBridge/JSON/JSONSerializer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Foundation

public final class JSONSerializer: JSONSerializing {
static var readingOptions: JSONSerialization.ReadingOptions {
if #available(iOS 15, *) {
if #available(iOS 15, macOS 12.0, *) {
return [.json5Allowed, .fragmentsAllowed]
} else {
return .fragmentsAllowed
Expand Down

0 comments on commit 1810cf4

Please sign in to comment.