We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9a24dc commit ac20d4bCopy full SHA for ac20d4b
templates/swift/Sources/NotificationHandler.swift.twig
@@ -1,9 +1,19 @@
1
-import SwiftUI
2
import JSONCodable
3
import FirebaseCore
4
import FirebaseMessaging
5
import AsyncHTTPClient
6
+#if os(iOS) || os(tvOS)
7
+import UIKit
8
+public typealias Application = UIApplication
9
+#elseif os(macOS)
10
+import AppKit
11
+public typealias Application = NSApplication
12
+#elseif os(watchOS)
13
+import WatchKit
14
+public typealias Application = WKApplication
15
+#endif
16
+
17
public enum Provider {
18
case fcm, apns
19
}
@@ -17,7 +27,7 @@ open class NotificationHandler {
27
internal var providerId: String? = nil
28
29
public func setup(
20
- _ application: UIApplication,
30
+ _ application: Application,
21
31
delegate: AppwriteDelegate,
22
32
provider: Provider
23
33
) {
0 commit comments