Skip to content

Commit ebf400a

Browse files
committed
Make NativePusher-related code available in macOS builds
1 parent 176f887 commit ebf400a

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Source/NativePusher.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
//
77
//
88

9+
#if os(iOS) || os(OSX)
10+
911
/**
1012
An interface to Pusher's native push notification service.
1113
The service is a pub-sub system for push notifications.
@@ -279,3 +281,5 @@ internal enum SubscriptionChange {
279281
}
280282
}
281283
}
284+
285+
#endif

Source/PusherSwift.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ let CLIENT_NAME = "pusher-websocket-swift"
1616
open weak var delegate: PusherDelegate? = nil {
1717
willSet {
1818
self.connection.delegate = newValue
19-
#if os(iOS)
19+
#if os(iOS) || os(OSX)
2020
self.nativePusher.delegate = newValue
2121
#endif
2222
}

Tests/NativePusherTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//
88

9-
#if os(iOS)
9+
#if os(iOS) || os(OSX)
1010

1111
@testable import PusherSwift
1212
import XCTest

0 commit comments

Comments
 (0)