Skip to content

Commit 3dc741e

Browse files
committed
Fixed a few errors related to older macOS versions
1 parent 3b1e6c0 commit 3dc741e

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

Package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import PackageDescription
55

66
let package = Package(
77
name: "TUSKit",
8-
platforms: [.iOS(.v10), .macOS(.v10_10)],
8+
platforms: [.iOS(.v10), .macOS(.v10_11)],
99
products: [
1010
// Products define the executables and libraries a package produces, and make them visible to other packages.
1111
.library(

Sources/TUSKit/TUSClient.swift

+6-1
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,15 @@ public final class TUSClient {
107107
storageDirectory: URL? = nil, chunkSize: Int = 500 * 1024,
108108
supportedExtensions: [TUSProtocolExtension] = [.creation]) throws {
109109

110-
if sessionConfiguration.sessionSendsLaunchEvents == false {
110+
if #available(iOS 7.0, macOS 11.0, *) {
111+
if sessionConfiguration.sessionSendsLaunchEvents == false {
111112
print("TUSClient warning: initializing with a session configuration that's not suited for background uploads.")
113+
}
114+
} else {
115+
print("TUSClient warning: Cannot verify URLSession background configuration; Background sessions are most likely not supported on your target OS.")
112116
}
113117

118+
114119
let scheduler = Scheduler()
115120
self.sessionIdentifier = sessionIdentifier
116121
self.api = TUSAPI(sessionConfiguration: sessionConfiguration)

TUSKit.podspec

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
Pod::Spec.new do |s|
99
s.name = 'TUSKit'
10-
s.version = '3.2'
10+
s.version = '3.2.0'
1111
s.summary = 'TUSKit client in Swift'
1212
s.swift_version = '5.0'
1313

@@ -28,8 +28,8 @@ Swift client for https://tus.io called TUSKit. Mac and iOS compatible.
2828
s.source = { :git => 'https://github.com/tus/TUSKit.git', :tag => s.version.to_s }
2929
s.platform = :ios
3030

31-
s.ios.deployment_target = '9.0'
32-
s.osx.deployment_target = '10.9'
31+
s.ios.deployment_target = '10.0'
32+
s.osx.deployment_target = '10.11'
3333

3434
s.source_files = 'Sources/TUSKit/**/*'
3535

0 commit comments

Comments
 (0)