Skip to content

Commit 6884ad4

Browse files
Add watchOS support for SwiftDuxExtras
1 parent c467078 commit 6884ad4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Sources/SwiftDuxExtras/Persistence/PersistStateMiddleware.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ import Combine
22
import Foundation
33
import SwiftDux
44

5-
#if canImport(UIKit)
5+
#if canImport(WatchKit)
6+
7+
import WatchKit
8+
fileprivate let notification: NSNotification.Name? = WKExtension.applicationDidEnterBackgroundNotification
9+
10+
#elseif canImport(UIKit)
611

712
import UIKit
813
fileprivate let notification: NSNotification.Name? = UIApplication.didEnterBackgroundNotification

0 commit comments

Comments
 (0)