Skip to content

Commit

Permalink
Fixed a few errors related to older macOS versions
Browse files Browse the repository at this point in the history
  • Loading branch information
donnywals committed Jun 28, 2023
1 parent 3b1e6c0 commit 3dc741e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PackageDescription

let package = Package(
name: "TUSKit",
platforms: [.iOS(.v10), .macOS(.v10_10)],
platforms: [.iOS(.v10), .macOS(.v10_11)],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
Expand Down
7 changes: 6 additions & 1 deletion Sources/TUSKit/TUSClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,15 @@ public final class TUSClient {
storageDirectory: URL? = nil, chunkSize: Int = 500 * 1024,
supportedExtensions: [TUSProtocolExtension] = [.creation]) throws {

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


let scheduler = Scheduler()
self.sessionIdentifier = sessionIdentifier
self.api = TUSAPI(sessionConfiguration: sessionConfiguration)
Expand Down
6 changes: 3 additions & 3 deletions TUSKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

Pod::Spec.new do |s|
s.name = 'TUSKit'
s.version = '3.2'
s.version = '3.2.0'
s.summary = 'TUSKit client in Swift'
s.swift_version = '5.0'

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

s.ios.deployment_target = '9.0'
s.osx.deployment_target = '10.9'
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.11'

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

Expand Down

0 comments on commit 3dc741e

Please sign in to comment.