Skip to content

Commit ee8bafd

Browse files
author
burak.uzunboy
committed
Platform supports
1 parent b1561a0 commit ee8bafd

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

Package.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import PackageDescription
55

66
let package = Package(
77
name: "iOSUsefulNetworkLayer",
8-
platforms: [.iOS(.v10)],
8+
platforms: [.iOS(.v10), .tvOS(.v10)],
99
products: [
1010
// Products define the executables and libraries produced by a package, and make them visible to other packages.
1111
.library(
@@ -14,16 +14,13 @@ let package = Package(
1414
],
1515
dependencies: [
1616
// Dependencies declare other packages that this package depends on.
17-
.package(url: "https://github.com/exozet/iOSCoreUsefulSDK", from: "1.0.0"),
17+
.package(url: "https://github.com/exozet/iOSCoreUsefulSDK", from: "1.0.5"),
1818
],
1919
targets: [
2020
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
2121
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
2222
.target(
2323
name: "iOSUsefulNetworkLayer",
24-
dependencies: ["iOSCoreUsefulSDK"]),
25-
.testTarget(
26-
name: "iOSUsefulNetworkLayerTests",
27-
dependencies: ["iOSUsefulNetworkLayer", "iOSCoreUsefulSDK"]),
24+
dependencies: ["iOSCoreUsefulSDK"])
2825
]
2926
)

Sources/iOSUsefulNetworkLayer/NetworkLayer/NetworkLayer+Cache.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@
2020
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
// THE SOFTWARE.
2222

23+
import Foundation
24+
#if !os(macOS) && !os(watchOS)
2325
import UIKit
26+
#endif
2427

2528
extension NetworkLayer {
2629

@@ -46,10 +49,12 @@ extension NetworkLayer {
4649

4750
/// Registers `NotificationCenter` for necessary messages.
4851
private func initialize() {
52+
#if !os(macOS) && !os(watchOS)
4953
NotificationCenter.default.addObserver(self,
5054
selector: #selector(didReceiveMemoryWarning),
5155
name: UIApplication.didReceiveMemoryWarningNotification,
5256
object: nil)
57+
#endif
5358
}
5459

5560
/// Remove observer from the `NotificationCenter`

Sources/iOSUsefulNetworkLayer/NetworkLayer/NetworkLayer.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
// THE SOFTWARE.
2222

2323
import Foundation
24-
import UIKit
2524

2625
/**
2726
Base Network Layer that capable to cache and manage the operation queue.

0 commit comments

Comments
 (0)