Skip to content

feat: bump minimum deployment target to iOS 15 - #19

Merged
andredestro merged 1 commit into
mainfrom
feat/RMET-5354/bump-minimum-ios-15
Aug 27, 2026
Merged

feat: bump minimum deployment target to iOS 15#19
andredestro merged 1 commit into
mainfrom
feat/RMET-5354/bump-minimum-ios-15

Conversation

@andredestro

@andredestro andredestro commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Closes RMET-5354.

Why

The library declared iOS 14 as its minimum, which had two consequences:

  1. It kept alive four #available(iOS 15, *) checks whose legacy branches used APIs Apple has since deprecated.

  2. 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:

    Deployment target Warnings
    14.0 0
    18.0 4
    26.0 8

    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.podspec and README.md.

Four #available(iOS 15, *) checks removed. In IONCAMRMediaResultGenerator the legacy branches used AVAsset.duration and AVAsset.tracks(withMediaType:), both deprecated in iOS 16, so deleting the branches also removed those deprecations. The taskOperation / taskiOS14 View extension, already annotated @available(iOS, deprecated: 15.0), is gone in favour of SwiftUI's own task.

AVAsset(url:)AVURLAsset(url:) in three places. The SDK marks it AVF_DEPRECATED_FOR_SWIFT_ONLY("Use AVURLAsset(url:) instead", ios(4.0, 18.0)). AVURLAsset is available since iOS 4 and is an AVAsset subclass, so no availability check is needed and load(.duration), loadTracks(withMediaType:), load(.isPlayable) and AVAssetImageGenerator(asset:) behave identically.

Video player presentation moved to an @MainActor method. Raising the target makes the DispatchQueue.main.async closure @Sendable, which surfaced a non-Sendable capture of self. 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: playVideo now awaits the presentation instead of firing and returning, which matches the caller in IONCAMRVideoManager already 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.interfaceOrientation and the + operator between Text values (both deprecated in iOS 26), for the same reason: their replacements are iOS 26-only.
  • swiftformat --lint reports pre-existing violations in 21 of 76 files, including one in a file this PR touches (IONCAMRMediaResultGenerator.swift). Confirmed the same violation exists on main; it comes from a SwiftFormat version drift, not from this change, so it is left alone.

Verification

  • xcodebuild build for iOS: 0 warnings, 0 errors
  • xcodebuild test on iPhone 17 simulator: 207 tests, 0 failures
  • swiftlint --strict: 0 violations

Breaking 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-analyzer reads under the Angular preset to publish 2.0.0. No ! marker in the subject: the Angular preset's headerPattern does not recognise it, so feat!: parses to no type at all and yields no release (details in #20).

@andredestro

Copy link
Copy Markdown
Collaborator Author

The Validate PR Title check is failing for a reason unrelated to this change: the workflow regex does not allow the ! breaking change marker, so feat!: ... is rejected. Fix is in #20.

Merge order: #20 first, then rebase this branch onto main so the check re-runs against the corrected regex.

Keeping the ! in the title matters here. PRs are squash merged, so the title becomes the commit subject on main and is what semantic-release reads to publish 2.0.0. The commit also carries a BREAKING CHANGE: footer as a second signal, but the title is the one that survives regardless of how the squash description is edited.

@OS-pedrogustavobilro OS-pedrogustavobilro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@andredestro
andredestro force-pushed the feat/RMET-5354/bump-minimum-ios-15 branch from 82b79b1 to 5f76a39 Compare August 26, 2026 11:25
@andredestro andredestro changed the title feat!: bump minimum deployment target to iOS 15 feat: bump minimum deployment target to iOS 15 Aug 26, 2026
@andredestro

Copy link
Copy Markdown
Collaborator Author

Agreed, dropping the !. Title and commit subject are now feat: bump minimum deployment target to iOS 15, with the BREAKING CHANGE: footer unchanged, which is what produces the major release under the Angular preset. Verified against commit-analyzer@13.0.1: feat: plus footer resolves to major.

Also closed #20. One detail worth recording there: the current preset does not merely ignore !, it fails to parse the header at all, so feat!: alone would have produced no release whatsoever.

The Validate PR Title check should now pass without any workflow change.

@andredestro
andredestro merged commit 16ade64 into main Aug 27, 2026
5 of 7 checks passed
@andredestro
andredestro deleted the feat/RMET-5354/bump-minimum-ios-15 branch August 27, 2026 14:30
capacitor-bot pushed a commit that referenced this pull request Aug 28, 2026
# [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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants