There was an error while loading. Please reload this page.
2 parents 3b0693d + 6884ad4 commit 24fda23Copy full SHA for 24fda23
Package.swift
@@ -7,6 +7,7 @@ let package = Package(
7
platforms: [
8
.iOS(.v14),
9
.macOS(.v11),
10
+ .watchOS(.v7),
11
],
12
products: [
13
.library(
Sources/SwiftDuxExtras/Persistence/PersistStateMiddleware.swift
@@ -2,7 +2,12 @@ import Combine
2
import Foundation
3
import SwiftDux
4
5
-#if canImport(UIKit)
+#if canImport(WatchKit)
6
+
+ import WatchKit
+ fileprivate let notification: NSNotification.Name? = WKExtension.applicationDidEnterBackgroundNotification
+#elseif canImport(UIKit)
import UIKit
fileprivate let notification: NSNotification.Name? = UIApplication.didEnterBackgroundNotification
0 commit comments