diff --git a/CHANGELOG.md b/CHANGELOG.md index 31d6cbc..1c86236 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Next +* Added the MIT `LICENSE` file referenced by the CocoaPods specification. +* Raised the minimum supported versions to iOS 15.0 and macOS 12.0 in CocoaPods and Swift Package Manager, matching the targets used to validate 3.6.0 with Xcode 27. Aligned the example app's target with iOS 15.0. Apps supporting older OS versions must stay on 3.6.0 or earlier. +* Removed an unused session configuration binding and its compiler warning. + ## 3.6.0 * Added `Transloadit-Client` headers with the SDK name and version to assembly creation, status, and cancellation requests. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e13512b..d41a394 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,12 +1,19 @@ # Contributing -Build and run the tests on macOS with Xcode installed: +Build, run the tests, and validate the pod on macOS with Xcode and CocoaPods installed: ```sh swift build swift test +pod lib lint Transloadit.podspec --allow-warnings ``` +`--allow-warnings` is used only to accept deployment-target warnings from TUSKit +3.6.0's published podspec (iOS 10.0 / macOS 10.11), until TUSKit publishes newer +minimums or TransloaditKit leaves CocoaPods. Xcode 27 rejects those targets with +build errors, so the flag alone does not make lint pass on that toolchain; see +[CocoaPods publication](#cocoapods-publication). + ## Releasing Release preparation and publication are separate steps. Prepare a PR that: @@ -61,56 +68,45 @@ it with `gh release view 3.6.0` instead of recreating it. ### CocoaPods publication +Publication requires Kevin's approval after the release preparation PR is merged. + Use a macOS machine with Xcode and CocoaPods installed. A pod owner must run `pod trunk register` with their pod-owner email address on that machine and confirm the session through the verification email. Run `pod trunk me` to confirm the session is verified and lists `Transloadit` before pushing. The [3.6.0 release on trunk](https://trunk.cocoapods.org/api/v1/pods/Transloadit/versions/3.6.0) -was published with CocoaPods 1.17.0 and Xcode 27.0. Use a clean repository checkout -on a macOS machine with Xcode and CocoaPods: +was published with CocoaPods 1.17.0 and Xcode 27.0. That release predates the +license and deployment-target fixes. Future releases declare iOS 15.0 and macOS +12.0 as their minimum supported versions. + +TUSKit 3.6.0 is the latest release on CocoaPods; +[3.7.0 removed CocoaPods support](https://github.com/tus/TUSKit/blob/3.7.0/CHANGELOG.md). +The `--allow-warnings` exception applies only to its published podspec's obsolete +iOS 10.0 / macOS 10.11 deployment targets, until TUSKit publishes newer minimums +or TransloaditKit leaves CocoaPods. Xcode 27 treats those targets as build errors, +so publication still needs a compatible toolchain or a dependency fix; accepting +the limitation for merging PR #50 does not authorize publication. + +For a new release, replace both placeholders below with the version and commit +from its merged preparation PR. Use a clean repository checkout on a macOS +machine with Xcode and CocoaPods, and continue only if validation succeeds: ```sh cd ~/code/TransloaditKit && ( set -e pod trunk me - RELEASE_VERSION=3.6.0 - RELEASE_COMMIT=d6628f3d7fe5b90bc8271f4912d7cadb25360a27 + RELEASE_VERSION=REPLACE_WITH_RELEASE_VERSION + RELEASE_COMMIT=REPLACE_WITH_RELEASE_COMMIT test -z "$(git status --porcelain=v1)" git fetch origin main --tags git checkout --detach "$RELEASE_VERSION" test "$(git rev-parse HEAD)" = "$RELEASE_COMMIT" + pod lib lint Transloadit.podspec --allow-warnings + pod trunk push Transloadit.podspec --allow-warnings ) ``` -Publish with `pod trunk push Transloadit.podspec` when the Xcode toolchain supports -the podspec's deployment targets. - -For 3.6.0, the plain push failed because Xcode 27 rejected the podspec's iOS 10.0 -and macOS 10.11 deployment targets. It also warned that the referenced `LICENSE` -file is missing and that an existing `identifier` binding is unused. The -successful push used a temporary build configuration with Xcode's supported -deployment targets and allowed those existing warnings: - -```sh -( - set -e - RELEASE_VALIDATION_DIR="$(mktemp -d -t transloaditkit-release)" - trap 'rm -f "$RELEASE_VALIDATION_DIR/validation.xcconfig"; rmdir "$RELEASE_VALIDATION_DIR"' EXIT - cat > "$RELEASE_VALIDATION_DIR/validation.xcconfig" <<'XCCONFIG' -IPHONEOS_DEPLOYMENT_TARGET = 15.0 -MACOSX_DEPLOYMENT_TARGET = 12.0 -XCCONFIG - XCODE_XCCONFIG_FILE="$RELEASE_VALIDATION_DIR/validation.xcconfig" \ - pod trunk push Transloadit.podspec --allow-warnings -) -``` - -This override applies only to the validation build. The published podspec still -comes from the release tag; build and import validation remain enabled. -It validates iOS 15.0 and macOS 12.0, rather than the older deployment targets -declared by the podspec. - The 3.6.0 push returned GitHub commit API timeouts despite completing publication. Run `pod trunk info Transloadit` and confirm the version is absent before retrying an interrupted push. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2f5be38 --- /dev/null +++ b/LICENSE @@ -0,0 +1,23 @@ +The MIT License (MIT) + +Copyright (c) 2014 Tim Koschuetzki +Copyright (c) 2016 Mark R. Masterson +Copyright (c) 2019 mmasterson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Package.swift b/Package.swift index 8cae5e5..7922e22 100644 --- a/Package.swift +++ b/Package.swift @@ -5,7 +5,7 @@ import PackageDescription let package = Package( name: "TransloaditKit", - platforms: [.iOS(.v10), .macOS(.v10_10)], + platforms: [.iOS(.v15), .macOS(.v12)], products: [ // Products define the executables and libraries a package produces, and make them visible to other packages. .library( diff --git a/Sources/TransloaditKit/URLSessionConfiguration+Copying.swift b/Sources/TransloaditKit/URLSessionConfiguration+Copying.swift index 4882e8d..09e6d8b 100644 --- a/Sources/TransloaditKit/URLSessionConfiguration+Copying.swift +++ b/Sources/TransloaditKit/URLSessionConfiguration+Copying.swift @@ -9,7 +9,7 @@ import Foundation extension URLSessionConfiguration { func copy(withIdentifier newIdentifier: String) -> URLSessionConfiguration { - if let identifier = self.identifier { + if self.identifier != nil { let copy = URLSessionConfiguration.background(withIdentifier: newIdentifier) copy.requestCachePolicy = requestCachePolicy copy.timeoutIntervalForRequest = timeoutIntervalForRequest diff --git a/Transloadit.podspec b/Transloadit.podspec index 07a2cc8..3a60233 100644 --- a/Transloadit.podspec +++ b/Transloadit.podspec @@ -27,8 +27,8 @@ Swift client for http://transloadit.com called TransloaditKit. Mac and iOS compa s.author = 'Transloadit' s.source = { :git => 'https://github.com/transloadit/TransloaditKit.git', :tag => s.version.to_s } - s.ios.deployment_target = '10.0' - s.osx.deployment_target = '10.11' + s.ios.deployment_target = '15.0' + s.osx.deployment_target = '12.0' s.source_files = 'Sources/TransloaditKit/**/*' diff --git a/TransloaditKitExample/TransloaditKitExample.xcodeproj/project.pbxproj b/TransloaditKitExample/TransloaditKitExample.xcodeproj/project.pbxproj index e1e0a82..f771558 100644 --- a/TransloaditKitExample/TransloaditKitExample.xcodeproj/project.pbxproj +++ b/TransloaditKitExample/TransloaditKitExample.xcodeproj/project.pbxproj @@ -312,7 +312,7 @@ INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -344,7 +344,7 @@ INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks",