Skip to content

Stored properties cannot be marked potentially unavailable with '@available' in AudioManager.swift (Swift 6.1/Xcode 16.4) #52

@Shultsie18

Description

@Shultsie18

To Reproduce
Steps to reproduce the behavior:

  1. Add DeltaCore as a Swift Package dependency.
  2. Build the project with Xcode 16.4 (Swift 6.1).
  3. See the build error.

Expected behavior
The package should build successfully on all supported Swift/Xcode versions.

Environment:

  • DeltaCore version: [your version or branch]
  • Xcode version: 16.4
  • Swift version: 6.1
  • Platform: iOS/macOS

Additional context
This is not allowed in Swift 6.1 (and earlier):

@available(iOS 15, *)
var myProperty: SomeType // ❌ Not allowed on stored properties

@available can only be used on computed properties, functions, types, or extensions.

Suggested fix
Remove @available from stored properties, or refactor to use computed properties or type-level availability.


Thank you for your work on DeltaCore!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions