Skip to content

Commit

Permalink
Make sure we stay compatible with Swift 5.10
Browse files Browse the repository at this point in the history
  • Loading branch information
Supereg committed Aug 12, 2024
1 parent 95d7343 commit b3b869b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Sources/Spezi/Spezi/SpeziNotificationCenterDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import UserNotifications


class SpeziNotificationCenterDelegate: NSObject, @preconcurrency UNUserNotificationCenterDelegate {
class SpeziNotificationCenterDelegate: NSObject {
#if !os(tvOS)
@MainActor
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse) async {

Check warning on line 15 in Sources/Spezi/Spezi/SpeziNotificationCenterDelegate.swift

View workflow job for this annotation

GitHub Actions / Build and Test Swift Package macOS / Test using xcodebuild or run fastlane

non-sendable type 'UNUserNotificationCenter' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'userNotificationCenter(_:didReceive:)' cannot cross actor boundary

Check warning on line 15 in Sources/Spezi/Spezi/SpeziNotificationCenterDelegate.swift

View workflow job for this annotation

GitHub Actions / Build and Test Swift Package macOS / Test using xcodebuild or run fastlane

non-sendable type 'UNNotificationResponse' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'userNotificationCenter(_:didReceive:)' cannot cross actor boundary

Check warning on line 15 in Sources/Spezi/Spezi/SpeziNotificationCenterDelegate.swift

View workflow job for this annotation

GitHub Actions / Build and Test Swift Package iOS / Test using xcodebuild or run fastlane

non-sendable type 'UNUserNotificationCenter' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'userNotificationCenter(_:didReceive:)' cannot cross actor boundary

Check warning on line 15 in Sources/Spezi/Spezi/SpeziNotificationCenterDelegate.swift

View workflow job for this annotation

GitHub Actions / Build and Test Swift Package iOS / Test using xcodebuild or run fastlane

non-sendable type 'UNNotificationResponse' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'userNotificationCenter(_:didReceive:)' cannot cross actor boundary

Check warning on line 15 in Sources/Spezi/Spezi/SpeziNotificationCenterDelegate.swift

View workflow job for this annotation

GitHub Actions / Build and Test Swift Package visionOS / Test using xcodebuild or run fastlane

non-sendable type 'UNUserNotificationCenter' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'userNotificationCenter(_:didReceive:)' cannot cross actor boundary

Check warning on line 15 in Sources/Spezi/Spezi/SpeziNotificationCenterDelegate.swift

View workflow job for this annotation

GitHub Actions / Build and Test Swift Package visionOS / Test using xcodebuild or run fastlane

non-sendable type 'UNNotificationResponse' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'userNotificationCenter(_:didReceive:)' cannot cross actor boundary

Check warning on line 15 in Sources/Spezi/Spezi/SpeziNotificationCenterDelegate.swift

View workflow job for this annotation

GitHub Actions / Build and Test Swift Package watchOS / Test using xcodebuild or run fastlane

non-sendable type 'UNUserNotificationCenter' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'userNotificationCenter(_:didReceive:)' cannot cross actor boundary

Check warning on line 15 in Sources/Spezi/Spezi/SpeziNotificationCenterDelegate.swift

View workflow job for this annotation

GitHub Actions / Build and Test Swift Package watchOS / Test using xcodebuild or run fastlane

non-sendable type 'UNNotificationResponse' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'userNotificationCenter(_:didReceive:)' cannot cross actor boundary

Check warning on line 15 in Sources/Spezi/Spezi/SpeziNotificationCenterDelegate.swift

View workflow job for this annotation

GitHub Actions / Build and Test UI Tests visionOS / Test using xcodebuild or run fastlane

non-sendable type 'UNUserNotificationCenter' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'userNotificationCenter(_:didReceive:)' cannot cross actor boundary

Check warning on line 15 in Sources/Spezi/Spezi/SpeziNotificationCenterDelegate.swift

View workflow job for this annotation

GitHub Actions / Build and Test UI Tests visionOS / Test using xcodebuild or run fastlane

non-sendable type 'UNNotificationResponse' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'userNotificationCenter(_:didReceive:)' cannot cross actor boundary

Check warning on line 15 in Sources/Spezi/Spezi/SpeziNotificationCenterDelegate.swift

View workflow job for this annotation

GitHub Actions / Build and Test UI Tests iOS / Test using xcodebuild or run fastlane

non-sendable type 'UNUserNotificationCenter' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'userNotificationCenter(_:didReceive:)' cannot cross actor boundary

Check warning on line 15 in Sources/Spezi/Spezi/SpeziNotificationCenterDelegate.swift

View workflow job for this annotation

GitHub Actions / Build and Test UI Tests iOS / Test using xcodebuild or run fastlane

non-sendable type 'UNNotificationResponse' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'userNotificationCenter(_:didReceive:)' cannot cross actor boundary
Expand Down Expand Up @@ -77,6 +77,13 @@ class SpeziNotificationCenterDelegate: NSObject, @preconcurrency UNUserNotificat
}


#if compiler(<6)
extension SpeziNotificationCenterDelegate: UNUserNotificationCenterDelegate {}
#else
extension SpeziNotificationCenterDelegate: @preconcurrency UNUserNotificationCenterDelegate {}
#endif


extension SpeziAppDelegate {
func setupNotificationDelegate() {
guard !spezi.notificationHandler.isEmpty else {
Expand Down

0 comments on commit b3b869b

Please sign in to comment.