Skip to content

Commit 452d709

Browse files
Fix CI build failures
- Add missing `import UIKit` to AccessibilityContainer.swift - Add Swift version check for @retroactive attribute (5.10+) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent ab614cb commit 452d709

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

Sources/AccessibilitySnapshot/Parser/Swift/Classes/AccessibilityContainer.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright 2025
2+
// Copyright 2025
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
// limitations under the License.
1515
//
1616

17-
17+
import UIKit
1818

1919
// MARK: - Container Visualization Types
2020

Sources/AccessibilitySnapshot/Parser/Swift/Classes/AccessibilityHierarchy+Codable.swift

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@ import UIKit
22

33
// MARK: - UIKit Type Codable Extensions
44

5-
extension UIAccessibilityTraits: @retroactive Codable {
6-
5+
#if swift(>=5.10)
6+
extension UIAccessibilityTraits: @retroactive Codable {}
7+
extension UIAccessibilityContainerType: @retroactive Codable {}
8+
#else
9+
extension UIAccessibilityTraits: Codable {}
10+
extension UIAccessibilityContainerType: Codable {}
11+
#endif
12+
13+
extension UIAccessibilityTraits {
14+
715
public init(from decoder: Decoder) throws {
816
let container = try decoder.singleValueContainer()
917
let rawValue = try container.decode(UInt64.self)
@@ -16,7 +24,7 @@ extension UIAccessibilityTraits: @retroactive Codable {
1624
}
1725
}
1826

19-
extension UIAccessibilityContainerType: @retroactive Codable {
27+
extension UIAccessibilityContainerType {
2028

2129
public init(from decoder: Decoder) throws {
2230
let container = try decoder.singleValueContainer()

0 commit comments

Comments
 (0)