File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- // swift-tools-version: 5.9
1+ // swift-tools-version: 6.2
22// The swift-tools-version declares the minimum version of Swift required to build this package.
33
44import PackageDescription
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ import UIKit
22
33@available ( iOSApplicationExtension, unavailable)
44public struct DebugMenu {
5+
6+ @MainActor
57 public static func install(
68 windowScene: UIWindowScene ? = nil ,
79 items: [ DebugItem ] = [ ] ,
Original file line number Diff line number Diff line change 11import Foundation
22
33public class Application {
4- public static var current : Application = . init ( )
4+ public static var current : Application { Application ( ) }
55
66 public var appName : String {
77 Bundle . main. object ( forInfoDictionaryKey: " CFBundleName " ) as! String
Original file line number Diff line number Diff line change 11import UIKit
22
3- public class Device {
4- public static let current : Device = . init( )
3+ @MainActor
4+ public final class Device {
5+ public static var current : Device { Device ( ) }
56
67 public var localizedModel : String {
78 UIDevice . current. localizedModel
Original file line number Diff line number Diff line change 11import Foundation
22import Metal
33
4- class GPU {
5- static var current : GPU = . init ( )
4+ final class GPU {
5+ static var current : GPU { GPU ( ) }
66 let device : MTLDevice
77
88 init ( ) {
Original file line number Diff line number Diff line change 11import Foundation
22import UIKit
33
4- public enum Options {
4+ public enum Options : Sendable {
55 case showsWidgetOnLaunch
66 case showsRecentItems
77 case launchIcon( LaunchIcon )
88
9- public struct LaunchIcon {
9+ public struct LaunchIcon : Sendable {
1010 public typealias Position = FloatingItemGestureRecognizer . Edge
1111
1212 let image : UIImage ?
@@ -21,7 +21,7 @@ public enum Options {
2121 }
2222 }
2323
24- public static var `default` : [ Options ] = [ . showsRecentItems]
24+ public static var `default` : [ Options ] { [ . showsRecentItems] }
2525
2626 var isShowsWidgetOnLaunch : Bool {
2727 if case . showsWidgetOnLaunch = self { return true }
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ public class FloatingItemGestureRecognizer: UIPanGestureRecognizer {
44 private weak var groundView : UIView ?
55 private var gestureGap : CGPoint ?
66 private let margin : CGFloat = 16
7- public enum Edge {
7+ public enum Edge : Sendable {
88 case top
99 // case center
1010 case bottom
@@ -26,7 +26,7 @@ public class FloatingItemGestureRecognizer: UIPanGestureRecognizer {
2626
2727 }
2828
29- deinit {
29+ @ MainActor deinit {
3030 self . removeTarget ( self , action: #selector( pan ( _: ) ) )
3131 }
3232
Original file line number Diff line number Diff line change 11import UIKit
22
3- public struct CaseSelectableDebugItem < T: CaseIterable & RawRepresentable > : DebugItem
3+ public struct CaseSelectableDebugItem < T: CaseIterable & RawRepresentable & Sendable > : DebugItem
44where T. RawValue: Equatable {
5- public init ( currentValue: T , didSelected: @escaping ( T ) -> Void ) {
5+ public init ( currentValue: T , didSelected: @escaping @ Sendable @ MainActor ( T ) -> Void ) {
66 self . action = . didSelect { controller in
77 let vc = CaseSelectableTableController < T > (
88 currentValue: currentValue,
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import Foundation
33public struct KeyValueDebugItem : DebugItem {
44 public init (
55 title: String ,
6- fetcher: @escaping ( ) async -> [ Envelope ]
6+ fetcher: @escaping @ Sendable @ MainActor ( ) async -> [ Envelope ]
77 ) {
88 self . title = title
99 self . action = . didSelect( operation: { parent in
Original file line number Diff line number Diff line change 11import Foundation
22import UIKit
33
4- public class CaseSelectableTableController < T: CaseIterable & RawRepresentable > :
4+ public class CaseSelectableTableController < T: CaseIterable & RawRepresentable & Sendable > :
55 UITableViewController
66where T. RawValue: Equatable {
77 public let currentValue : T
88 public let didSelected : ( T ) -> Void
99 private var selectedIndex : IndexPath ? = nil
1010
11- public init ( currentValue: T , didSelected: @escaping ( T ) -> Void ) {
11+ public init ( currentValue: T , didSelected: @escaping @ Sendable @ MainActor ( T ) -> Void ) {
1212 self . currentValue = currentValue
1313 self . didSelected = didSelected
1414 super. init ( style: . grouped)
You can’t perform that action at this time.
0 commit comments