Skip to content

Swift 6 / Xcode 26 Beta Compatibility #164

@Nachx639

Description

@Nachx639

Summary

I've been building Clawdis with Xcode 26 beta (Swift 6.2.3) and encountered several compatibility issues. I've created fixes and wanted to check if you're interested in Swift 6 forward-compatibility contributions.

Issues Found

1. Real Bug Fix (affects all versions)

  • CLAuthorizationStatus.authorizedWhenInUse is referenced in location permission code but never existed on macOS - it's iOS only. Xcode 16 didn't catch this, but Xcode 26 does.

2. Swift 6 Strict Concurrency

  • WizardStartResult, WizardNextResult, WizardStatusResult need Sendable conformance
  • CLLocationManagerDelegate methods need nonisolated attribute with Task { @MainActor in } wrapper
  • withTimeout generic needs Sendable constraint

3. Swift 6 Initialization Rules

  • AppState.init property initialization order needs adjustment
  • Removed deinit that accessed MainActor-isolated properties

4. Xcode 26 Compiler Workarounds

  • Deeply nested closures in SwiftUI @ViewBuilder cause compiler crashes - extracted to separate functions
  • Some computed properties need explicit @ViewBuilder attribute

Proposed PRs

If you're interested, I can submit:

  1. PR 1: Bug fix for authorizedWhenInUse (small, safe for all Xcode versions)
  2. PR 2: Swift 6 compatibility changes (forward-compatible, works on Xcode 16 too)

Let me know if this would be useful!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions