File tree Expand file tree Collapse file tree
.swiftpm/xcode/package.xcworkspace 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: 5.9
22// The swift-tools-version declares the minimum version of Swift required to build this package.
33
44import PackageDescription
55
66let package = Package (
77 name: " DebugMenu " ,
88 defaultLocalization: " en " ,
9- platforms: [ . iOS( . v14 ) ] ,
9+ platforms: [ . iOS( . v16 ) ] ,
1010 products: [
1111 . library(
1212 name: " DebugMenu " ,
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 Foundation
22
3- public protocol DashboardItem {
3+ @MainActor
4+ public protocol DashboardItem : Sendable {
45 var title : String { get }
56 func startMonitoring( )
67 func stopMonitoring( )
Original file line number Diff line number Diff line change 11import UIKit
22
3- public protocol DebugItem {
3+ public protocol DebugItem : Sendable {
44 var debugItemTitle : String { get }
55 var action : DebugItemAction { get }
66}
77
8- public enum DebugItemAction {
8+ public enum DebugItemAction : Sendable {
99 case didSelect(
10- operation: ( _ controller: UIViewController ) async -> DebugMenuResult
10+ operation: @ Sendable @ MainActor ( _ controller: UIViewController ) async -> DebugMenuResult
1111 )
12- case execute( _ operation: ( ) async -> DebugMenuResult )
12+ case execute( _ operation: @ Sendable ( ) async -> DebugMenuResult )
1313 case toggle(
14- current: ( ) -> Bool ,
15- operation: ( _ isOn: Bool ) async -> DebugMenuResult
14+ current: @ Sendable ( ) -> Bool ,
15+ operation: @ Sendable ( _ isOn: Bool ) async -> DebugMenuResult
1616 )
1717 case slider(
18- current: ( ) -> Double ,
19- valueLabelText: ( Double ) -> String ,
18+ current: @ Sendable ( ) -> Double ,
19+ valueLabelText: @ Sendable ( Double ) -> String ,
2020 range: ClosedRange < Double > ,
21- operation: ( _ value: Double ) async -> DebugMenuResult
21+ operation: @ Sendable ( _ value: Double ) async -> DebugMenuResult
2222 )
2323}
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
22
3- public struct NetworkUsage {
3+ public struct NetworkUsage : Sendable {
44 public let wifiDataSent : UInt64
55 public let wifiDataReceived : UInt64
66 public let wwanDataSent : UInt64
Original file line number Diff line number Diff line change 11import Foundation
22
3- public enum MetricsFetcher {
4- case text( _ fetcher: ( ) -> String )
5- case graph( _ fetcher: ( ) -> [ Double ] )
6- case interval( _ fetcher: ( ) -> [ TimeInterval ] )
3+ public enum MetricsFetcher : Sendable {
4+ case text( _ fetcher: @ Sendable @ MainActor ( ) -> String )
5+ case graph( _ fetcher: @ Sendable @ MainActor ( ) -> [ Double ] )
6+ case interval( _ fetcher: @ Sendable @ MainActor ( ) -> [ TimeInterval ] )
77}
You can’t perform that action at this time.
0 commit comments