Skip to content

Commit

Permalink
Adjust platform availability
Browse files Browse the repository at this point in the history
  • Loading branch information
W1W1-M committed Nov 22, 2021
1 parent 7a504f5 commit 4805636
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ let package = Package(
name: "PackAPrefPane",
defaultLocalization: "en",
platforms: [
.iOS(.v14)
.macOS(.v11),
.iOS(.v14)
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
Expand Down
7 changes: 6 additions & 1 deletion Sources/PackAPrefPane/Views/About.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// MARK: - Modules
import SwiftUI
// MARK: - Views
@available(macOS 11.0, iOS 14, *)
struct About: View {
// Variables
let prefPaneData: PrefPaneData
Expand All @@ -17,6 +18,7 @@ struct About: View {
}
}
// MARK: - AppInfo
@available(macOS 11.0, iOS 14, *)
struct AppInfo: View {
// Variables
let prefPaneData: PrefPaneData
Expand Down Expand Up @@ -46,6 +48,7 @@ struct AppInfo: View {
}
}
// MARK: - ThirdParyCodeList
@available(macOS 11.0, iOS 14, *)
struct ThirdPartyCodeList: View {
// Variables
@State var thirdPartyCodeExpanded: Bool = false
Expand All @@ -64,6 +67,7 @@ struct ThirdPartyCodeList: View {
}
}
// MARK: - ThirdPartyCodeItem
@available(macOS 11.0, iOS 14, *)
struct ThirdPartyCodeItem: View {
// Variables
let thirdPartyCode: ThirdPartyCode
Expand Down Expand Up @@ -93,7 +97,8 @@ struct ThirdPartyCodeItem: View {
}
}
// MARK: - Previews
struct AppInfo_Previews: PreviewProvider {
@available(macOS 11.0, iOS 14, *)
struct About_Previews: PreviewProvider {
static var previews: some View {
Form {
About(
Expand Down
6 changes: 6 additions & 0 deletions Sources/PackAPrefPane/Views/Help.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// MARK: - Modules
import SwiftUI
// MARK: - Views
@available(macOS 11.0, iOS 14, *)
struct Help: View {
// Variables
let prefPaneData: PrefPaneData
Expand All @@ -31,6 +32,7 @@ struct Help: View {
}
}
// MARK: - Feedback
@available(macOS 11.0, iOS 14, *)
struct Feedback: View {
// Variables
let prefPaneData: PrefPaneData
Expand All @@ -46,6 +48,7 @@ struct Feedback: View {
}
}
// MARK: - Support
@available(macOS 11.0, iOS 14, *)
struct Support: View {
// Variables
let prefPaneData: PrefPaneData
Expand All @@ -66,6 +69,7 @@ struct Support: View {
}
}
// MARK: - WhatsNew
@available(macOS 11.0, iOS 14, *)
struct WhatsNew: View {
// Variables
@State private var whatsNewExpanded: Bool = false
Expand All @@ -91,6 +95,7 @@ struct WhatsNew: View {
}
}
// MARK: - FAQ
@available(macOS 11.0, iOS 14, *)
struct FAQ: View {
// Variables
@State private var faqExpanded: Bool = false
Expand All @@ -117,6 +122,7 @@ struct FAQ: View {
}
}
// MARK: - Previews
@available(macOS 11.0, iOS 14, *)
struct Help_Previews: PreviewProvider {
@State var alertPresented: Bool = false
static var previews: some View {
Expand Down
6 changes: 6 additions & 0 deletions Sources/PackAPrefPane/Views/Legal.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// MARK: - Modules
import SwiftUI
// MARK: - Views
@available(macOS 11.0, iOS 14, *)
struct Legal: View {
// Variables
@State private var alertPresented: Bool = false
Expand Down Expand Up @@ -81,6 +82,7 @@ struct Legal: View {
}
}
// MARK: - Disclaimer
@available(macOS 11.0, iOS 14, *)
struct Disclaimer: View {
// Variables
@Binding var alertPresented: Bool
Expand Down Expand Up @@ -109,6 +111,7 @@ struct Disclaimer: View {
}
}
// MARK: - PrivacyPolicy
@available(macOS 11.0, iOS 14, tvOS 14, watchOS 7, *)
struct PrivacyPolicy: View {
// Variables
@Binding var alertPresented: Bool
Expand Down Expand Up @@ -138,6 +141,7 @@ struct PrivacyPolicy: View {
}
}
// MARK: - Acknowledgments
@available(macOS 11.0, iOS 14, tvOS 14, watchOS 7, *)
struct Acknowledgments: View {
// Variables
@Binding var alertPresented: Bool
Expand All @@ -157,6 +161,7 @@ struct Acknowledgments: View {
}
}
// MARK: - TermsOfService
@available(macOS 11.0, iOS 14, tvOS 14, watchOS 7, *)
struct TermsOfService: View {
// Variables
@State private var tosExpanded: Bool = false
Expand All @@ -169,6 +174,7 @@ struct TermsOfService: View {
}
}
// MARK: - Previews
@available(macOS 11.0, iOS 14, tvOS 14, watchOS 7, *)
struct Legal_Previews: PreviewProvider {
static var previews: some View {
Form{
Expand Down
3 changes: 2 additions & 1 deletion Sources/PackAPrefPane/Views/PackAPrefPane.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// MARK: - Modules
import SwiftUI
// MARK: - Views
@available(iOS 14, *)
@available(macOS 11.0, iOS 14, *)
public struct PackAPrefPane<Content: View>: View {
// Variables
public init( // public init for public struct
Expand Down Expand Up @@ -47,6 +47,7 @@ public struct PackAPrefPane<Content: View>: View {
}
}
// MARK: - Previews
@available(macOS 11.0, iOS 14, *)
struct PackAPrefPane_Previews: PreviewProvider {
static var previews: some View {
PackAPrefPane(
Expand Down

0 comments on commit 4805636

Please sign in to comment.