Skip to content

Commit f1c9033

Browse files
committed
Fix oauth for watchos 7+
1 parent 2897252 commit f1c9033

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

templates/swift/Sources/OAuth/View+OAuth.swift.twig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22
typealias OSApplication = NSApplication
33
typealias OSViewController = NSViewController
44
let notificationType = NSApplication.willBecomeActiveNotification
5-
#elseif os(iOS) || os(tvOS) || os(watchOS)
5+
#elseif os(iOS) || os(tvOS)
66
typealias OSApplication = UIApplication
77
typealias OSViewController = UIViewController
88
let notificationType = UIApplication.willEnterForegroundNotification
9+
#elseif os(watchOS)
10+
typealias OSApplication = WKApplication
11+
typealias OSViewController = WKInterfaceController
12+
let notificationType = WKApplication.willEnterForegroundNotification
913
#endif
1014

1115
#if canImport(SwiftUI)

0 commit comments

Comments
 (0)