Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update minimum Swift version to 5.5 #1787

Merged
merged 6 commits into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ on:
jobs:
build-package:
name: "Build Package"
# The macos-11 image includes Xcode 12 releases, but the macos-12
# image only includes Xcode 13 releases. We still need to use macos-11
# on this job to build using Swift 5.3 and Swift 5.4.
runs-on: macos-11
runs-on: macos-12
strategy:
fail-fast: false
matrix:
xcode:
- '12.4' # Swift 5.3
- '12.5.1' # Swift 5.4
- '13.2' # Swift 5.5
- '13.2.1' # Swift 5.5
- '13.4.1' # Swift 5.6
- '14.0.1' # Swift 5.7
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/setup
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.3
// swift-tools-version:5.5
import PackageDescription

let package = Package(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ extension CALayer {
NSNumber(value: Float(context.progressTime(for: keyframeModel.time)))
}

var timingFunctions = self.timingFunctions(for: keyframes)
let calculationMode = self.calculationMode(for: keyframes)
var timingFunctions = timingFunctions(for: keyframes)
let calculationMode = calculationMode(for: keyframes)

let animation = CAKeyframeAnimation(keyPath: property.caLayerKeypath)

Expand Down
2 changes: 1 addition & 1 deletion Sources/Private/Utility/Debugging/LayerDebugging.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ extension CALayer {

@nonobjc
func setDebuggingState(visible: Bool) {
var sublayers = self.sublayers
var sublayers = sublayers
if let cust = self as? CustomLayerDebugging {
sublayers = cust.layerForDebugging().sublayers
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ extension String {
}
if let index = firstIndex(of: "*") {
// Wildcard search.
let prefix = String(self.prefix(upTo: index))
let suffix = String(self.suffix(from: self.index(after: index)))
let prefix = String(prefix(upTo: index))
let suffix = String(suffix(from: self.index(after: index)))

if prefix.count > 0 {
// Match prefix.
Expand Down
4 changes: 2 additions & 2 deletions Sources/Public/Animation/LottieAnimationView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1121,8 +1121,8 @@ final public class LottieAnimationView: LottieAnimationViewBase {

""")

let animationContext = self.animationContext
let currentFrame = self.currentFrame
let animationContext = animationContext
let currentFrame = currentFrame

makeAnimationLayer(usingEngine: .mainThread)

Expand Down
2 changes: 1 addition & 1 deletion lottie-ios.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Lottie enables designers to create and ship beautiful animations without an engi
s.author = { 'Brandon Withrow' => '[email protected]', 'Cal Stephens' => '[email protected]' }
s.source = { :git => 'https://github.com/airbnb/lottie-ios.git', :tag => s.version.to_s }

s.swift_version = '5.3'
s.swift_version = '5.5'
s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.10'
s.tvos.deployment_target = '11.0'
Expand Down