feat: bump minimum deployment target to iOS 15 - #19
Conversation
|
The Merge order: #20 first, then rebase this branch onto Keeping the |
OS-pedrogustavobilro
left a comment
There was a problem hiding this comment.
Note, when you say "Apps with a deployment target of iOS 14 can no longer consume this library. The commit is marked feat! with a BREAKING CHANGE footer, so semantic-release will publish 2.0.0."
Really it should be feat: (...) with BREAKING CHANGE footer
Without the ! basically. See my other comment #20
Raise the minimum supported iOS version from 14 to 15 and drop the compatibility code it required. - Remove the four `#available(iOS 15, *)` checks. The legacy branches relied on `AVAsset.duration` and `AVAsset.tracks(withMediaType:)`, both deprecated in iOS 16, so deleting them also removes those deprecations. - Delete the `taskOperation`/`taskiOS14` View extension, already marked `@available(iOS, deprecated: 15.0)`, in favour of SwiftUI's `task`. - Replace `AVAsset(url:)` with `AVURLAsset(url:)`, deprecated in iOS 18. SwiftPM compiles dependencies with the consuming app's deployment target, so apps targeting iOS 18 were seeing these warnings. - Move video player presentation to an `@MainActor` method. Raising the target makes the `DispatchQueue.main.async` closure `@Sendable`, which surfaced a non-Sendable capture of `self`. `AVAssetImageGenerator.copyCGImage(at:actualTime:)` is left untouched: its replacement requires iOS 16, so fixing it now would reintroduce an availability check. BREAKING CHANGE: the minimum supported iOS version is now 15.0. Apps with a deployment target of iOS 14 can no longer consume this library.
82b79b1 to
5f76a39
Compare
|
Agreed, dropping the Also closed #20. One detail worth recording there: the current preset does not merely ignore The |
# [2.0.0](1.0.5...2.0.0) (2026-08-28) ### Features * bump minimum deployment target to iOS 15 ([#19](#19)) ([16ade64](16ade64)) ### BREAKING CHANGES * the minimum supported iOS version is now 15.0. Apps with a deployment target of iOS 14 can no longer consume this library.
Closes RMET-5354.
Why
The library declared
iOS 14as its minimum, which had two consequences:It kept alive four
#available(iOS 15, *)checks whose legacy branches used APIs Apple has since deprecated.It hid every deprecation warning from the library's own build. Clang only reports a deprecation when the deployment target is at or above the version where the API was deprecated, so at target 14 the build was clean:
Those warnings were not invisible to consumers, though. SwiftPM compiles a dependency with the consuming app's deployment target, so an app targeting iOS 18 did see them.
What changed
Minimum target raised to iOS 15 in
Package.swift,IONCameraLib.podspecandREADME.md.Four
#available(iOS 15, *)checks removed. InIONCAMRMediaResultGeneratorthe legacy branches usedAVAsset.durationandAVAsset.tracks(withMediaType:), both deprecated in iOS 16, so deleting the branches also removed those deprecations. ThetaskOperation/taskiOS14Viewextension, already annotated@available(iOS, deprecated: 15.0), is gone in favour of SwiftUI's owntask.AVAsset(url:)→AVURLAsset(url:)in three places. The SDK marks itAVF_DEPRECATED_FOR_SWIFT_ONLY("Use AVURLAsset(url:) instead", ios(4.0, 18.0)).AVURLAssetis available since iOS 4 and is anAVAssetsubclass, so no availability check is needed andload(.duration),loadTracks(withMediaType:),load(.isPlayable)andAVAssetImageGenerator(asset:)behave identically.Video player presentation moved to an
@MainActormethod. Raising the target makes theDispatchQueue.main.asyncclosure@Sendable, which surfaced a non-Sendable capture ofself. Verified this came from the target and not from the other edits: same code builds with 0 warnings at target 14 and 1 warning at target 15. Side effect:playVideonow awaits the presentation instead of firing and returning, which matches the caller inIONCAMRVideoManageralready awaiting it.Deliberately out of scope
AVAssetImageGenerator.copyCGImage(at:actualTime:)(deprecated in iOS 18). Its replacement,generateCGImageAsynchronously(for:completionHandler:), requires iOS 16, so fixing it now means adding an#available(iOS 16, *)check, i.e. trading a warning for exactly the kind of legacy branch this PR removes. Worth doing when the minimum reaches 16.windowScene.interfaceOrientationand the+operator betweenTextvalues (both deprecated in iOS 26), for the same reason: their replacements are iOS 26-only.swiftformat --lintreports pre-existing violations in 21 of 76 files, including one in a file this PR touches (IONCAMRMediaResultGenerator.swift). Confirmed the same violation exists onmain; it comes from a SwiftFormat version drift, not from this change, so it is left alone.Verification
xcodebuild buildfor iOS: 0 warnings, 0 errorsxcodebuild teston iPhone 17 simulator: 207 tests, 0 failuresswiftlint --strict: 0 violationsBreaking change
Apps with a deployment target of iOS 14 can no longer consume this library. The commit carries a
BREAKING CHANGE:footer, which is what@semantic-release/commit-analyzerreads under the Angular preset to publish 2.0.0. No!marker in the subject: the Angular preset'sheaderPatterndoes not recognise it, sofeat!:parses to no type at all and yields no release (details in #20).