diff --git a/Package.swift b/Package.swift index 3adbed8..6f5c24e 100644 --- a/Package.swift +++ b/Package.swift @@ -1,11 +1,11 @@ -// swift-tools-version:5.9 +// swift-tools-version:6.0 import PackageDescription let package = Package( name: "TwoFa", // Defines the package name as TwoFa platforms: [ - .macOS(.v14), // macOS 14 and later - .iOS(.v17) // iOS 17 and later + .macOS(.v15), // macOS 14 and later + .iOS(.v18) // iOS 17 and later ], // Specifies the platforms supported by the package products: [ .library( diff --git a/Sources/TwoFa/util/OTPArc/OTPArc+Const.swift b/Sources/TwoFa/util/OTPArc/OTPArc+Const.swift index eef0896..42f8289 100644 --- a/Sources/TwoFa/util/OTPArc/OTPArc+Const.swift +++ b/Sources/TwoFa/util/OTPArc/OTPArc+Const.swift @@ -16,6 +16,14 @@ extension OTPArc { internal let lineWidth: CGFloat /** * - Note: Needed for public init + * - Parameters: + * - tints: - Fixme: ⚠️️ Add doc + * - iconSize: - Fixme: ⚠️️ Add doc + * - font: - Fixme: ⚠️️ Add doc + * - fontColor: - Fixme: ⚠️️ Add doc + * - bgStrokColor: - Fixme: ⚠️️ Add doc + * - background: - Fixme: ⚠️️ Add doc + * - lineWidth: - Fixme: ⚠️️ Add doc */ public init(tints: (idle: Color, start: Color, end: Color), iconSize: CGFloat, font: Font, fontColor: Color, bgStrokColor: Color, background: Color, lineWidth: CGFloat) { self.tints = tints @@ -29,7 +37,7 @@ extension OTPArc { /** * Default graph style */ - public static let defaultGraphStyle: GraphStyle = { + public static var defaultGraphStyle: GraphStyle { .init( tints: (.blue, .green, .red), iconSize: 24, @@ -39,6 +47,6 @@ extension OTPArc { background: .clear, lineWidth: 3 ) - }() + } } } diff --git a/Sources/TwoFa/util/OTPArc/OTPArc+Preview.swift b/Sources/TwoFa/util/OTPArc/OTPArc+Preview.swift index 464e554..54b3fed 100644 --- a/Sources/TwoFa/util/OTPArc/OTPArc+Preview.swift +++ b/Sources/TwoFa/util/OTPArc/OTPArc+Preview.swift @@ -1,5 +1,7 @@ import SwiftUI - +/** + * - Fixme: ⚠️️ Add doc + */ #Preview { let url: URL = .init(string: "otpauth://hotp/test?secret=6UAOpz+x3dsNrQ==&algorithm=SHA512&digits=6&counter=1")! let account: OTPAccount = try! .init(url: url) diff --git a/Sources/TwoFa/util/OTPArc/OTPArc.swift b/Sources/TwoFa/util/OTPArc/OTPArc.swift index c7e56d6..9fbcf7a 100644 --- a/Sources/TwoFa/util/OTPArc/OTPArc.swift +++ b/Sources/TwoFa/util/OTPArc/OTPArc.swift @@ -59,7 +59,9 @@ public struct OTPArc: View { * `OTPAccount`. If an account is provided, it * initializes an `OTPTimer` to manage OTP * generation timing. - * - Parameter account: The data model to generate timer from etc + * - Parameters: + * - account: The data model to generate timer from etc + * - graphStyle: - Fixme: ⚠️️ Add doc */ public init(account: OTPAccount?, graphStyle: GraphStyle = .defaultGraphStyle) { self.account = account diff --git a/Sources/TwoFa/util/OTPTimer.swift b/Sources/TwoFa/util/OTPTimer.swift index d43b6ba..679c253 100644 --- a/Sources/TwoFa/util/OTPTimer.swift +++ b/Sources/TwoFa/util/OTPTimer.swift @@ -156,7 +156,9 @@ extension OTPTimer { * to the console. * - Note: If you forget to add event handler, this will be called */ - fileprivate static let defaultOnChange: OTPTimerCallback = { (_: OTPTimer) in - Swift.print("Default onChange") + fileprivate static var defaultOnChange: OTPTimerCallback { + { (_: OTPTimer) in + Swift.print("Default onChange") + } } }