diff --git a/Package.swift b/Package.swift index 2b0d6e3..a1cf476 100644 --- a/Package.swift +++ b/Package.swift @@ -23,7 +23,10 @@ let permissionsTargets: [Target] = [ .target( name: "PermissionsSwiftUICalendar", dependencies: ["Introspect", "CorePermissionsSwiftUI"], - exclude: ["../../Tests/PermissionsSwiftUITests/__Snapshots__"] + exclude: ["../../Tests/PermissionsSwiftUITests/__Snapshots__"], + swiftSettings: [ + .define("PERMISSIONSWIFTUI_EVENT") + ] ), .target( name: "PermissionsSwiftUICamera", @@ -93,7 +96,10 @@ let permissionsTargets: [Target] = [ .target( name: "PermissionsSwiftUIReminder", dependencies: ["Introspect", "CorePermissionsSwiftUI"], - exclude: ["../../Tests/PermissionsSwiftUITests/__Snapshots__"] + exclude: ["../../Tests/PermissionsSwiftUITests/__Snapshots__"], + swiftSettings: [ + .define("PERMISSIONSWIFTUI_EVENT") + ] ), .target( name: "PermissionsSwiftUISpeech", @@ -142,4 +148,4 @@ let package = Package( ), ] + permissionsTargets -) +) \ No newline at end of file diff --git a/Sources/CorePermissionsSwiftUI/Model/PermissionManagers/EventPermissionManager.swift b/Sources/CorePermissionsSwiftUI/Model/PermissionManagers/EventPermissionManager.swift index 1928600..08d4cf8 100644 --- a/Sources/CorePermissionsSwiftUI/Model/PermissionManagers/EventPermissionManager.swift +++ b/Sources/CorePermissionsSwiftUI/Model/PermissionManagers/EventPermissionManager.swift @@ -6,6 +6,8 @@ // import Foundation + +#if !os(tvOS) && PERMISSIONSWIFTUI_EVENT import EventKit open class EventPermissionManager: PermissionManager { @@ -52,3 +54,4 @@ open class EventPermissionManager: PermissionManager { } } +#endif \ No newline at end of file diff --git a/Sources/PermissionsSwiftUICalendar/JMCalendarPermissionManager.swift b/Sources/PermissionsSwiftUICalendar/JMCalendarPermissionManager.swift index e333d49..b5a2639 100644 --- a/Sources/PermissionsSwiftUICalendar/JMCalendarPermissionManager.swift +++ b/Sources/PermissionsSwiftUICalendar/JMCalendarPermissionManager.swift @@ -5,8 +5,8 @@ // Created by Jevon Mao on 1/31/21. // -import UIKit -#if !os(tvOS) +import Foundation +#if !os(tvOS) && PERMISSIONSWIFTUI_EVENT import EventKit import CorePermissionsSwiftUI diff --git a/Sources/PermissionsSwiftUIReminder/JMRemindersPermissionManager.swift b/Sources/PermissionsSwiftUIReminder/JMRemindersPermissionManager.swift index d187fb0..546a6f5 100644 --- a/Sources/PermissionsSwiftUIReminder/JMRemindersPermissionManager.swift +++ b/Sources/PermissionsSwiftUIReminder/JMRemindersPermissionManager.swift @@ -6,7 +6,7 @@ // import Foundation -#if !os(tvOS) +#if !os(tvOS) && PERMISSIONSWIFTUI_EVENT import EventKit import CorePermissionsSwiftUI