Skip to content

Commit 24fda23

Browse files
Merge pull request #57 from kamilpowalowski/watchos-minimum-version
watchOS setup
2 parents 3b0693d + 6884ad4 commit 24fda23

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Package.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ let package = Package(
77
platforms: [
88
.iOS(.v14),
99
.macOS(.v11),
10+
.watchOS(.v7),
1011
],
1112
products: [
1213
.library(

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)