Преглед на файлове

Update to Xcode 14 / Swift 5.7
This requires dropping support for iOS/tvOS <11, macOS < 10.13, watchOS < 4
Also, Swift support < 5.5 is removed - SPM will automatically search for an older version.

Florian Friedrich преди 3 години
родител
ревизия
eeda259175

+ 5 - 6
CocoaLumberjack.podspec

@@ -1,5 +1,4 @@
 Pod::Spec.new do |s|
-
   s.name     = 'CocoaLumberjack'
   s.version  = '3.7.4'
   s.license  = 'BSD'
@@ -16,14 +15,14 @@ Pod::Spec.new do |s|
 
   s.preserve_paths = 'README.md'
 
-  s.ios.deployment_target     = '9.0'
-  s.osx.deployment_target     = '10.10'
-  s.watchos.deployment_target = '3.0'
-  s.tvos.deployment_target    = '9.0'
+  s.ios.deployment_target     = '11.0'
+  s.osx.deployment_target     = '10.13'
+  s.watchos.deployment_target = '4.0'
+  s.tvos.deployment_target    = '11.0'
 
   s.cocoapods_version = '>= 1.4.0'
   s.requires_arc   = true
-  s.swift_version = '5.0'
+  s.swift_versions = ['5.5', '5.6', '5.7']
 
   s.default_subspecs = 'Core'
 

+ 4 - 8
Configs/Module-Shared.xcconfig

@@ -121,10 +121,6 @@ DYLIB_CURRENT_VERSION = 1
 // Sets the base value for the internal `install path` (`LC_ID_DYLIB`) in a dynamic library. This will be combined with the `EXECUTABLE_PATH` to form the full install path.
 DYLIB_INSTALL_NAME_BASE = @rpath
 
-// Activating this setting indicates that the target or project should generate bitcode during compilation for platforms and architectures that support it. For Archive builds, bitcode will be generated in the linked binary for submission to the App Store. For other builds, the compiler and linker will check whether the code complies with the requirements for bitcode generation, but will not generate actual bitcode.
-ENABLE_BITCODE = YES
-ENABLE_BITCODE[sdk=macosx*] = NO
-
 // Controls whether `objc_msgSend` calls must be cast to the appropriate function pointer type before being called.
 ENABLE_STRICT_OBJC_MSGSEND = YES
 
@@ -192,7 +188,7 @@ GCC_WARN_UNUSED_VARIABLE = YES
 HEADER_SEARCH_PATHS = $(inherited)
 
 // Code will load on this and later versions of iOS. Framework APIs that are unavailable in earlier versions will be weak-linked; your code should check for null function pointers or specific system versions before calling newer APIs.
-IPHONEOS_DEPLOYMENT_TARGET = 9.0
+IPHONEOS_DEPLOYMENT_TARGET = 11.0
 
 // This is a list of paths to be added to the `runpath` search path list for the image being created. At runtime, `dyld` uses the `runpath` when searching for dylibs whose load path begins with `@rpath/`.
 LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/Frameworks
@@ -201,7 +197,7 @@ LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/
 LIBRARY_SEARCH_PATHS = $(inherited)
 
 // Code will load on this and later versions of macOS. Framework APIs that are unavailable in earlier versions will be weak-linked; your code should check for null function pointers or specific system versions before calling newer APIs.
-MACOSX_DEPLOYMENT_TARGET = 10.10
+MACOSX_DEPLOYMENT_TARGET = 10.13
 
 MARKETING_VERSION = 3.7.4
 
@@ -242,10 +238,10 @@ SWIFT_VERSION = 5.0
 TARGETED_DEVICE_FAMILY = 1,2,3,4
 
 // Code will load on this and later versions of tvOS. Framework APIs that are unavailable in earlier versions will be weak-linked; your code should check for null function pointers or specific system versions before calling newer APIs.
-TVOS_DEPLOYMENT_TARGET = 9.0
+TVOS_DEPLOYMENT_TARGET = 11.0
 
 // Selects the process used for version-stamping generated files. * *None:* Use no versioning system. * *Apple Generic:* Use the current project version setting. [apple-generic]
 VERSIONING_SYSTEM = apple-generic
 
 // Code will load on this and later versions of watchOS. Framework APIs that are unavailable in earlier versions will be weak-linked; your code should check for null function pointers or specific system versions before calling newer APIs.
-WATCHOS_DEPLOYMENT_TARGET = 3.0
+WATCHOS_DEPLOYMENT_TARGET = 4.0

+ 6 - 19
Integration/Integration.xcodeproj/xcshareddata/xcschemes/watchOSSwiftIntegration (Notification).xcscheme

@@ -65,10 +65,8 @@
       allowLocationSimulation = "YES"
       launchAutomaticallySubstyle = "8"
       notificationPayloadFile = "watchOSSwiftIntegration Extension/PushNotificationPayload.apns">
-      <RemoteRunnable
-         runnableDebuggingMode = "2"
-         BundleIdentifier = "com.apple.Carousel"
-         RemotePath = "/iOSSwiftIntegration">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
          <BuildableReference
             BuildableIdentifier = "primary"
             BlueprintIdentifier = "0A87D5562177C25700BD0C4C"
@@ -76,7 +74,7 @@
             BlueprintName = "watchOSSwiftIntegration"
             ReferencedContainer = "container:Integration.xcodeproj">
          </BuildableReference>
-      </RemoteRunnable>
+      </BuildableProductRunnable>
    </LaunchAction>
    <ProfileAction
       buildConfiguration = "Release"
@@ -86,10 +84,8 @@
       debugDocumentVersioning = "YES"
       launchAutomaticallySubstyle = "8"
       notificationPayloadFile = "watchOSSwiftIntegration Extension/PushNotificationPayload.apns">
-      <RemoteRunnable
-         runnableDebuggingMode = "2"
-         BundleIdentifier = "com.apple.Carousel"
-         RemotePath = "/iOSSwiftIntegration">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
          <BuildableReference
             BuildableIdentifier = "primary"
             BlueprintIdentifier = "0A87D5562177C25700BD0C4C"
@@ -97,16 +93,7 @@
             BlueprintName = "watchOSSwiftIntegration"
             ReferencedContainer = "container:Integration.xcodeproj">
          </BuildableReference>
-      </RemoteRunnable>
-      <MacroExpansion>
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "0A87D5562177C25700BD0C4C"
-            BuildableName = "watchOSSwiftIntegration.app"
-            BlueprintName = "watchOSSwiftIntegration"
-            ReferencedContainer = "container:Integration.xcodeproj">
-         </BuildableReference>
-      </MacroExpansion>
+      </BuildableProductRunnable>
    </ProfileAction>
    <AnalyzeAction
       buildConfiguration = "Debug">

+ 6 - 19
Integration/Integration.xcodeproj/xcshareddata/xcschemes/watchOSSwiftIntegration.xcscheme

@@ -64,10 +64,8 @@
       debugServiceExtension = "internal"
       allowLocationSimulation = "YES"
       notificationPayloadFile = "watchOSSwiftIntegration Extension/PushNotificationPayload.apns">
-      <RemoteRunnable
-         runnableDebuggingMode = "2"
-         BundleIdentifier = "com.apple.Carousel"
-         RemotePath = "/iOSSwiftIntegration">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
          <BuildableReference
             BuildableIdentifier = "primary"
             BlueprintIdentifier = "0A87D5562177C25700BD0C4C"
@@ -75,7 +73,7 @@
             BlueprintName = "watchOSSwiftIntegration"
             ReferencedContainer = "container:Integration.xcodeproj">
          </BuildableReference>
-      </RemoteRunnable>
+      </BuildableProductRunnable>
    </LaunchAction>
    <ProfileAction
       buildConfiguration = "Release"
@@ -84,10 +82,8 @@
       useCustomWorkingDirectory = "NO"
       debugDocumentVersioning = "YES"
       notificationPayloadFile = "watchOSSwiftIntegration Extension/PushNotificationPayload.apns">
-      <RemoteRunnable
-         runnableDebuggingMode = "2"
-         BundleIdentifier = "com.apple.Carousel"
-         RemotePath = "/iOSSwiftIntegration">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
          <BuildableReference
             BuildableIdentifier = "primary"
             BlueprintIdentifier = "0A87D5562177C25700BD0C4C"
@@ -95,16 +91,7 @@
             BlueprintName = "watchOSSwiftIntegration"
             ReferencedContainer = "container:Integration.xcodeproj">
          </BuildableReference>
-      </RemoteRunnable>
-      <MacroExpansion>
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "0A87D5562177C25700BD0C4C"
-            BuildableName = "watchOSSwiftIntegration.app"
-            BlueprintName = "watchOSSwiftIntegration"
-            ReferencedContainer = "container:Integration.xcodeproj">
-         </BuildableReference>
-      </MacroExpansion>
+      </BuildableProductRunnable>
    </ProfileAction>
    <AnalyzeAction
       buildConfiguration = "Debug">

+ 33 - 20
Package.swift

@@ -1,4 +1,4 @@
-// swift-tools-version:5.6
+// swift-tools-version:5.7
 // The swift-tools-version declares the minimum version of Swift required to build this package.
 
 import PackageDescription
@@ -6,10 +6,10 @@ import PackageDescription
 let package = Package(
     name: "CocoaLumberjack",
     platforms: [
-        .iOS(.v9),
-        .macOS(.v10_10),
-        .watchOS(.v3),
-        .tvOS(.v9),
+        .macOS(.v10_13),
+        .iOS(.v11),
+        .tvOS(.v11),
+        .watchOS(.v4),
     ],
     products: [
         // Products define the executables and libraries produced by a package, and make them visible to other packages.
@@ -29,20 +29,33 @@ let package = Package(
     targets: [
         // Targets are the basic building blocks of a package. A target can define a module or a test suite.
         // Targets can depend on other targets in this package, and on products in packages which this package depends on.
-        .target(name: "CocoaLumberjack",
-                exclude: ["Supporting Files"]),
-        .target(name: "CocoaLumberjackSwiftSupport",
-                dependencies: ["CocoaLumberjack"]),
-        .target(name: "CocoaLumberjackSwift",
-                dependencies: ["CocoaLumberjack", "CocoaLumberjackSwiftSupport"],
-                exclude: ["Supporting Files"]),
-        .target(name: "CocoaLumberjackSwiftLogBackend",
-                dependencies: ["CocoaLumberjack", .product(name: "Logging", package: "swift-log")]),
-        .testTarget(name: "CocoaLumberjackTests",
-                    dependencies: ["CocoaLumberjack"]),
-        .testTarget(name: "CocoaLumberjackSwiftTests",
-                    dependencies: ["CocoaLumberjackSwift"]),
-        .testTarget(name: "CocoaLumberjackSwiftLogBackendTests",
-                    dependencies: ["CocoaLumberjackSwiftLogBackend"]),
+        .target(
+            name: "CocoaLumberjack",
+            exclude: ["Supporting Files"]),
+        .target(
+            name: "CocoaLumberjackSwiftSupport",
+            dependencies: ["CocoaLumberjack"]),
+        .target(
+            name: "CocoaLumberjackSwift",
+            dependencies: [
+                "CocoaLumberjack",
+                "CocoaLumberjackSwiftSupport"
+            ],
+            exclude: ["Supporting Files"]),
+        .target(
+            name: "CocoaLumberjackSwiftLogBackend",
+            dependencies: [
+                "CocoaLumberjack",
+                .product(name: "Logging", package: "swift-log")
+            ]),
+        .testTarget(
+            name: "CocoaLumberjackTests",
+            dependencies: ["CocoaLumberjack"]),
+        .testTarget(
+            name: "CocoaLumberjackSwiftTests",
+            dependencies: ["CocoaLumberjackSwift"]),
+        .testTarget(
+            name: "CocoaLumberjackSwiftLogBackendTests",
+            dependencies: ["CocoaLumberjackSwiftLogBackend"]),
     ]
 )

+ 0 - 48
Package@swift-5.0.swift

@@ -1,48 +0,0 @@
-// swift-tools-version:5.0
-// The swift-tools-version declares the minimum version of Swift required to build this package.
-
-import PackageDescription
-
-let package = Package(
-    name: "CocoaLumberjack",
-    platforms: [
-        .iOS(.v8),
-        .macOS(.v10_10),
-        .watchOS(.v3),
-        .tvOS(.v9)
-    ],
-    products: [
-        // Products define the executables and libraries produced by a package, and make them visible to other packages.
-        .library(
-            name: "CocoaLumberjack",
-            targets: ["CocoaLumberjack"]),
-        .library(
-            name: "CocoaLumberjackSwift",
-            targets: ["CocoaLumberjackSwift"]),
-        .library(
-            name: "CocoaLumberjackSwiftLogBackend",
-            targets: ["CocoaLumberjackSwiftLogBackend"]),
-    ],
-    dependencies: [
-        .package(url: "https://github.com/apple/swift-log.git", from: "1.4.0"),
-    ],
-    targets: [
-        // Targets are the basic building blocks of a package. A target can define a module or a test suite.
-        // Targets can depend on other targets in this package, and on products in packages which this package depends on.
-        .target(name: "CocoaLumberjack",
-                exclude: ["Supporting Files"]),
-        .target(name: "CocoaLumberjackSwiftSupport",
-                dependencies: ["CocoaLumberjack"]),
-        .target(name: "CocoaLumberjackSwift",
-                dependencies: ["CocoaLumberjack", "CocoaLumberjackSwiftSupport"],
-                exclude: ["Supporting Files"]),
-        .target(name: "CocoaLumberjackSwiftLogBackend",
-                dependencies: ["CocoaLumberjack", "Logging"]),
-        .testTarget(name: "CocoaLumberjackTests",
-                    dependencies: ["CocoaLumberjack"]),
-        .testTarget(name: "CocoaLumberjackSwiftTests",
-                    dependencies: ["CocoaLumberjackSwift"]),
-        .testTarget(name: "CocoaLumberjackSwiftLogBackendTests",
-                    dependencies: ["CocoaLumberjackSwiftLogBackend"]),
-    ]
-)

+ 0 - 48
Package@swift-5.1.swift

@@ -1,48 +0,0 @@
-// swift-tools-version:5.1
-// The swift-tools-version declares the minimum version of Swift required to build this package.
-
-import PackageDescription
-
-let package = Package(
-    name: "CocoaLumberjack",
-    platforms: [
-        .iOS(.v8),
-        .macOS(.v10_10),
-        .watchOS(.v3),
-        .tvOS(.v9)
-    ],
-    products: [
-        // Products define the executables and libraries produced by a package, and make them visible to other packages.
-        .library(
-            name: "CocoaLumberjack",
-            targets: ["CocoaLumberjack"]),
-        .library(
-            name: "CocoaLumberjackSwift",
-            targets: ["CocoaLumberjackSwift"]),
-        .library(
-            name: "CocoaLumberjackSwiftLogBackend",
-            targets: ["CocoaLumberjackSwiftLogBackend"]),
-    ],
-    dependencies: [
-        .package(url: "https://github.com/apple/swift-log.git", from: "1.4.0"),
-    ],
-    targets: [
-        // Targets are the basic building blocks of a package. A target can define a module or a test suite.
-        // Targets can depend on other targets in this package, and on products in packages which this package depends on.
-        .target(name: "CocoaLumberjack",
-                exclude: ["Supporting Files"]),
-        .target(name: "CocoaLumberjackSwiftSupport",
-                dependencies: ["CocoaLumberjack"]),
-        .target(name: "CocoaLumberjackSwift",
-                dependencies: ["CocoaLumberjack", "CocoaLumberjackSwiftSupport"],
-                exclude: ["Supporting Files"]),
-        .target(name: "CocoaLumberjackSwiftLogBackend",
-                dependencies: ["CocoaLumberjack", "Logging"]),
-        .testTarget(name: "CocoaLumberjackTests",
-                    dependencies: ["CocoaLumberjack"]),
-        .testTarget(name: "CocoaLumberjackSwiftTests",
-                    dependencies: ["CocoaLumberjackSwift"]),
-        .testTarget(name: "CocoaLumberjackSwiftLogBackendTests",
-                    dependencies: ["CocoaLumberjackSwiftLogBackend"]),
-    ]
-)

+ 0 - 48
Package@swift-5.2.swift

@@ -1,48 +0,0 @@
-// swift-tools-version:5.2
-// The swift-tools-version declares the minimum version of Swift required to build this package.
-
-import PackageDescription
-
-let package = Package(
-    name: "CocoaLumberjack",
-    platforms: [
-        .iOS(.v9),
-        .macOS(.v10_10),
-        .watchOS(.v3),
-        .tvOS(.v9),
-    ],
-    products: [
-        // Products define the executables and libraries produced by a package, and make them visible to other packages.
-        .library(
-            name: "CocoaLumberjack",
-            targets: ["CocoaLumberjack"]),
-        .library(
-            name: "CocoaLumberjackSwift",
-            targets: ["CocoaLumberjackSwift"]),
-        .library(
-            name: "CocoaLumberjackSwiftLogBackend",
-            targets: ["CocoaLumberjackSwiftLogBackend"]),
-    ],
-    dependencies: [
-        .package(url: "https://github.com/apple/swift-log.git", from: "1.4.0"),
-    ],
-    targets: [
-        // Targets are the basic building blocks of a package. A target can define a module or a test suite.
-        // Targets can depend on other targets in this package, and on products in packages which this package depends on.
-        .target(name: "CocoaLumberjack",
-                exclude: ["Supporting Files"]),
-        .target(name: "CocoaLumberjackSwiftSupport",
-                dependencies: ["CocoaLumberjack"]),
-        .target(name: "CocoaLumberjackSwift",
-                dependencies: ["CocoaLumberjack", "CocoaLumberjackSwiftSupport"],
-                exclude: ["Supporting Files"]),
-        .target(name: "CocoaLumberjackSwiftLogBackend",
-                dependencies: ["CocoaLumberjack", .product(name: "Logging", package: "swift-log")]),
-        .testTarget(name: "CocoaLumberjackTests",
-                    dependencies: ["CocoaLumberjack"]),
-        .testTarget(name: "CocoaLumberjackSwiftTests",
-                    dependencies: ["CocoaLumberjackSwift"]),
-        .testTarget(name: "CocoaLumberjackSwiftLogBackendTests",
-                    dependencies: ["CocoaLumberjackSwiftLogBackend"]),
-    ]
-)

+ 0 - 48
Package@swift-5.3.swift

@@ -1,48 +0,0 @@
-// swift-tools-version:5.3
-// The swift-tools-version declares the minimum version of Swift required to build this package.
-
-import PackageDescription
-
-let package = Package(
-    name: "CocoaLumberjack",
-    platforms: [
-        .iOS(.v9),
-        .macOS(.v10_10),
-        .watchOS(.v3),
-        .tvOS(.v9),
-    ],
-    products: [
-        // Products define the executables and libraries produced by a package, and make them visible to other packages.
-        .library(
-            name: "CocoaLumberjack",
-            targets: ["CocoaLumberjack"]),
-        .library(
-            name: "CocoaLumberjackSwift",
-            targets: ["CocoaLumberjackSwift"]),
-        .library(
-            name: "CocoaLumberjackSwiftLogBackend",
-            targets: ["CocoaLumberjackSwiftLogBackend"]),
-    ],
-    dependencies: [
-        .package(url: "https://github.com/apple/swift-log.git", from: "1.4.0"),
-    ],
-    targets: [
-        // Targets are the basic building blocks of a package. A target can define a module or a test suite.
-        // Targets can depend on other targets in this package, and on products in packages which this package depends on.
-        .target(name: "CocoaLumberjack",
-                exclude: ["Supporting Files"]),
-        .target(name: "CocoaLumberjackSwiftSupport",
-                dependencies: ["CocoaLumberjack"]),
-        .target(name: "CocoaLumberjackSwift",
-                dependencies: ["CocoaLumberjack", "CocoaLumberjackSwiftSupport"],
-                exclude: ["Supporting Files"]),
-        .target(name: "CocoaLumberjackSwiftLogBackend",
-                dependencies: ["CocoaLumberjack", .product(name: "Logging", package: "swift-log")]),
-        .testTarget(name: "CocoaLumberjackTests",
-                    dependencies: ["CocoaLumberjack"]),
-        .testTarget(name: "CocoaLumberjackSwiftTests",
-                    dependencies: ["CocoaLumberjackSwift"]),
-        .testTarget(name: "CocoaLumberjackSwiftLogBackendTests",
-                    dependencies: ["CocoaLumberjackSwiftLogBackend"]),
-    ]
-)

+ 0 - 48
Package@swift-5.4.swift

@@ -1,48 +0,0 @@
-// swift-tools-version:5.4
-// The swift-tools-version declares the minimum version of Swift required to build this package.
-
-import PackageDescription
-
-let package = Package(
-    name: "CocoaLumberjack",
-    platforms: [
-        .iOS(.v9),
-        .macOS(.v10_10),
-        .watchOS(.v3),
-        .tvOS(.v9),
-    ],
-    products: [
-        // Products define the executables and libraries produced by a package, and make them visible to other packages.
-        .library(
-            name: "CocoaLumberjack",
-            targets: ["CocoaLumberjack"]),
-        .library(
-            name: "CocoaLumberjackSwift",
-            targets: ["CocoaLumberjackSwift"]),
-        .library(
-            name: "CocoaLumberjackSwiftLogBackend",
-            targets: ["CocoaLumberjackSwiftLogBackend"]),
-    ],
-    dependencies: [
-        .package(url: "https://github.com/apple/swift-log.git", from: "1.4.0"),
-    ],
-    targets: [
-        // Targets are the basic building blocks of a package. A target can define a module or a test suite.
-        // Targets can depend on other targets in this package, and on products in packages which this package depends on.
-        .target(name: "CocoaLumberjack",
-                exclude: ["Supporting Files"]),
-        .target(name: "CocoaLumberjackSwiftSupport",
-                dependencies: ["CocoaLumberjack"]),
-        .target(name: "CocoaLumberjackSwift",
-                dependencies: ["CocoaLumberjack", "CocoaLumberjackSwiftSupport"],
-                exclude: ["Supporting Files"]),
-        .target(name: "CocoaLumberjackSwiftLogBackend",
-                dependencies: ["CocoaLumberjack", .product(name: "Logging", package: "swift-log")]),
-        .testTarget(name: "CocoaLumberjackTests",
-                    dependencies: ["CocoaLumberjack"]),
-        .testTarget(name: "CocoaLumberjackSwiftTests",
-                    dependencies: ["CocoaLumberjackSwift"]),
-        .testTarget(name: "CocoaLumberjackSwiftLogBackendTests",
-                    dependencies: ["CocoaLumberjackSwiftLogBackend"]),
-    ]
-)

+ 32 - 19
Package@swift-5.5.swift

@@ -6,10 +6,10 @@ import PackageDescription
 let package = Package(
     name: "CocoaLumberjack",
     platforms: [
-        .iOS(.v9),
-        .macOS(.v10_10),
-        .watchOS(.v3),
-        .tvOS(.v9),
+        .macOS(.v10_13),
+        .iOS(.v11),
+        .tvOS(.v11),
+        .watchOS(.v4),
     ],
     products: [
         // Products define the executables and libraries produced by a package, and make them visible to other packages.
@@ -29,20 +29,33 @@ let package = Package(
     targets: [
         // Targets are the basic building blocks of a package. A target can define a module or a test suite.
         // Targets can depend on other targets in this package, and on products in packages which this package depends on.
-        .target(name: "CocoaLumberjack",
-                exclude: ["Supporting Files"]),
-        .target(name: "CocoaLumberjackSwiftSupport",
-                dependencies: ["CocoaLumberjack"]),
-        .target(name: "CocoaLumberjackSwift",
-                dependencies: ["CocoaLumberjack", "CocoaLumberjackSwiftSupport"],
-                exclude: ["Supporting Files"]),
-        .target(name: "CocoaLumberjackSwiftLogBackend",
-                dependencies: ["CocoaLumberjack", .product(name: "Logging", package: "swift-log")]),
-        .testTarget(name: "CocoaLumberjackTests",
-                    dependencies: ["CocoaLumberjack"]),
-        .testTarget(name: "CocoaLumberjackSwiftTests",
-                    dependencies: ["CocoaLumberjackSwift"]),
-        .testTarget(name: "CocoaLumberjackSwiftLogBackendTests",
-                    dependencies: ["CocoaLumberjackSwiftLogBackend"]),
+        .target(
+            name: "CocoaLumberjack",
+            exclude: ["Supporting Files"]),
+        .target(
+            name: "CocoaLumberjackSwiftSupport",
+            dependencies: ["CocoaLumberjack"]),
+        .target(
+            name: "CocoaLumberjackSwift",
+            dependencies: [
+                "CocoaLumberjack",
+                "CocoaLumberjackSwiftSupport"
+            ],
+            exclude: ["Supporting Files"]),
+        .target(
+            name: "CocoaLumberjackSwiftLogBackend",
+            dependencies: [
+                "CocoaLumberjack",
+                .product(name: "Logging", package: "swift-log")
+            ]),
+        .testTarget(
+            name: "CocoaLumberjackTests",
+            dependencies: ["CocoaLumberjack"]),
+        .testTarget(
+            name: "CocoaLumberjackSwiftTests",
+            dependencies: ["CocoaLumberjackSwift"]),
+        .testTarget(
+            name: "CocoaLumberjackSwiftLogBackendTests",
+            dependencies: ["CocoaLumberjackSwiftLogBackend"]),
     ]
 )

+ 61 - 0
Package@swift-5.6.swift

@@ -0,0 +1,61 @@
+// swift-tools-version:5.6
+// The swift-tools-version declares the minimum version of Swift required to build this package.
+
+import PackageDescription
+
+let package = Package(
+    name: "CocoaLumberjack",
+    platforms: [
+        .macOS(.v10_13),
+        .iOS(.v11),
+        .tvOS(.v11),
+        .watchOS(.v4),
+    ],
+    products: [
+        // Products define the executables and libraries produced by a package, and make them visible to other packages.
+        .library(
+            name: "CocoaLumberjack",
+            targets: ["CocoaLumberjack"]),
+        .library(
+            name: "CocoaLumberjackSwift",
+            targets: ["CocoaLumberjackSwift"]),
+        .library(
+            name: "CocoaLumberjackSwiftLogBackend",
+            targets: ["CocoaLumberjackSwiftLogBackend"]),
+    ],
+    dependencies: [
+        .package(url: "https://github.com/apple/swift-log.git", from: "1.4.0"),
+    ],
+    targets: [
+        // Targets are the basic building blocks of a package. A target can define a module or a test suite.
+        // Targets can depend on other targets in this package, and on products in packages which this package depends on.
+        .target(
+            name: "CocoaLumberjack",
+            exclude: ["Supporting Files"]),
+        .target(
+            name: "CocoaLumberjackSwiftSupport",
+            dependencies: ["CocoaLumberjack"]),
+        .target(
+            name: "CocoaLumberjackSwift",
+            dependencies: [
+                "CocoaLumberjack",
+                "CocoaLumberjackSwiftSupport"
+            ],
+            exclude: ["Supporting Files"]),
+        .target(
+            name: "CocoaLumberjackSwiftLogBackend",
+            dependencies: [
+                "CocoaLumberjack",
+                .product(name: "Logging", package: "swift-log")
+            ]),
+        .testTarget(
+            name: "CocoaLumberjackTests",
+            dependencies: ["CocoaLumberjack"]),
+        .testTarget(
+            name: "CocoaLumberjackSwiftTests",
+            dependencies: ["CocoaLumberjackSwift"]),
+        .testTarget(
+            name: "CocoaLumberjackSwiftLogBackendTests",
+            dependencies: ["CocoaLumberjackSwiftLogBackend"]),
+    ]
+)

+ 11 - 27
Sources/CocoaLumberjack/DDAbstractDatabaseLogger.m

@@ -114,16 +114,10 @@
         dispatch_source_cancel(_saveTimer);
 
         // Must activate a timer before releasing it (or it will crash)
-        if (@available(macOS 10.12, iOS 10.0, tvOS 10.0, watchOS 3.0, *)) {
-            if (_saveTimerSuspended < 0) {
-                dispatch_activate(_saveTimer);
-            } else if (_saveTimerSuspended > 0) {
-                dispatch_resume(_saveTimer);
-            }
-        } else {
-            if (_saveTimerSuspended != 0) {
-                dispatch_resume(_saveTimer);
-            }
+        if (_saveTimerSuspended < 0) {
+            dispatch_activate(_saveTimer);
+        } else if (_saveTimerSuspended > 0) {
+            dispatch_resume(_saveTimer);
         }
 
         #if !OS_OBJECT_USE_OBJC
@@ -141,19 +135,12 @@
 
         dispatch_source_set_timer(_saveTimer, startTime, interval, 1ull * NSEC_PER_SEC);
 
-        if (@available(macOS 10.12, iOS 10.0, tvOS 10.0, watchOS 3.0, *)) {
-            if (_saveTimerSuspended < 0) {
-                dispatch_activate(_saveTimer);
-                _saveTimerSuspended = 0;
-            } else if (_saveTimerSuspended > 0) {
-                dispatch_resume(_saveTimer);
-                _saveTimerSuspended = 0;
-            }
-        } else {
-            if (_saveTimerSuspended != 0) {
-                dispatch_resume(_saveTimer);
-                _saveTimerSuspended = 0;
-            }
+        if (_saveTimerSuspended < 0) {
+            dispatch_activate(_saveTimer);
+            _saveTimerSuspended = 0;
+        } else if (_saveTimerSuspended > 0) {
+            dispatch_resume(_saveTimer);
+            _saveTimerSuspended = 0;
         }
     }
 }
@@ -208,10 +195,7 @@
 
             // We are sure that -updateDeleteTimer did call dispatch_source_set_timer()
             // since it has the same guards on _deleteInterval and _maxAge
-            if (@available(macOS 10.12, iOS 10.0, tvOS 10.0, watchOS 3.0, *))
-                dispatch_activate(_deleteTimer);
-            else
-                dispatch_resume(_deleteTimer);
+            dispatch_activate(_deleteTimer);
         }
     }
 }

+ 2 - 10
Sources/CocoaLumberjack/DDFileLogger.m

@@ -832,11 +832,7 @@ NSTimeInterval     const kDDRollingLeeway              = 1.0;              // 1s
     __auto_type fireTime = dispatch_walltime(NULL, delay); // `NULL` uses `gettimeofday` internally
 
     dispatch_source_set_timer(_rollingTimer, fireTime, DISPATCH_TIME_FOREVER, (uint64_t)kDDRollingLeeway * NSEC_PER_SEC);
-
-    if (@available(macOS 10.12, iOS 10.0, tvOS 10.0, watchOS 3.0, *))
-        dispatch_activate(_rollingTimer);
-    else
-        dispatch_resume(_rollingTimer);
+    dispatch_activate(_rollingTimer);
 }
 
 - (void)rollLogFile {
@@ -1159,11 +1155,7 @@ NSTimeInterval     const kDDRollingLeeway              = 1.0;              // 1s
     });
 #endif
 
-    if (@available(macOS 10.12, iOS 10.0, tvOS 10.0, watchOS 3.0, *)) {
-        dispatch_activate(_currentLogFileVnode);
-    } else {
-        dispatch_resume(_currentLogFileVnode);
-    }
+    dispatch_activate(_currentLogFileVnode);
 }
 
 - (NSFileHandle *)lt_currentLogFileHandle {

+ 3 - 4
Sources/CocoaLumberjackSwift/DDLog+Combine.swift

@@ -22,7 +22,7 @@ import CocoaLumberjack
 import CocoaLumberjackSwiftSupport
 #endif
 
-@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
+@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
 extension DDLog {
     /**
      * Creates a message publisher.
@@ -44,7 +44,7 @@ extension DDLog {
     }
 
     // MARK: - MessagePublisher
-    @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
+    @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
     public struct MessagePublisher: Combine.Publisher {
         public typealias Output = DDLogMessage
         public typealias Failure = Never
@@ -101,12 +101,11 @@ extension DDLog {
     }
 }
 
-@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
+@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
 extension Publisher where Output == DDLogMessage {
     public func formatted(with formatter: DDLogFormatter) -> Publishers.CompactMap<Self, String> {
         return compactMap { formatter.format(message: $0) }
     }
 }
-
 #endif
 #endif