Fix MainActor violation in KingfisherSource, update minimum deployment to iOS 13, and update external dependencies #443
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
This PR fixes a concurrency violation in KingfisherSource.load(to:with:), where setImage(with:) must be called from a @mainactor context.
In addition, it updates:
The minimum deployment target to iOS 13 to align with Swift Concurrency requirements and modern platform standards.
Several external library dependencies to their latest stable versions.
Changes:
✅ Wrap kf.setImage call inside Task { @mainactor in ... } to ensure correct thread access.
✅ Update iOS minimum deployment target to iOS 13.
✅ Update external libraries:
AFNetworking from 3.2.1 ➔ 3.2.1 (no update needed — latest available is 4.0.1, but 3.x seems intentional for Objective-C compatibility)
Alamofire from 5.2.1 ➔ 5.10.2
AlamofireImage from 4.1.0 ➔ 4.3.0
Kingfisher from 5.14.0 ➔ 8.3.2
SDWebImage from 5.8.1 ➔ 5.21.0
Why:
Concurrency compliance: Future-proofs the codebase against Swift concurrency runtime errors.
Platform alignment: iOS 13 introduced critical modern APIs such as Combine and initial concurrency support.
Dependency maintenance: Ensures compatibility with newer Swift and Xcode versions, security fixes, and performance improvements.
Impact:
Apps using this library must now target iOS 13 or later.
Updated dependencies could introduce minor behavior changes; no major breaking change expected based on release notes.
Notes:
Happy to adjust this PR based on feedback! 🙏