Skip to content

Conversation

@dcalhoun
Copy link
Member

What?

Fixes two Swift compiler warnings that appear when building the Swift package.

Why?

These warnings add noise to the build output and indicate code that could be cleaned up:

  1. An unnecessary try keyword on a non-throwing actor method
  2. Use of a deprecated iOS API that has no effect

How?

  • Removed the unnecessary try from the existingBundle(forManifestChecksum:) call in tests (the method doesn't throw, but await is still required since it's an actor)
  • Removed the deprecated selectionGranularity property assignment, which has been ignored since iOS 11.0

Testing Instructions

  1. Run make test-swift-package
  2. Verify no warnings appear for EditorAssetLibraryTests.swift or EditorViewController.swift
  3. Verify all tests pass

Accessibility Testing Instructions

N/A - no UI changes.

Screenshots or screencast

N/A

The `existingBundle(forManifestChecksum:)` method doesn't throw, so the
`try` keyword was unnecessary. The `await` is still required because
`EditorAssetLibrary` is an actor.

Fixes warning:
no calls to throwing functions occur within 'try' expression
This property was deprecated in iOS 11.0 and is ignored by the system.
Selection granularity is always `.character` by default.

Fixes warning:
'selectionGranularity' was deprecated in iOS 11.0: This property is
ignored; selection granularity is always `character`.
@dcalhoun dcalhoun added the [Type] Code Quality Issues or PRs that relate to code quality label Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants