Skip to content

Commit

Permalink
Merge pull request #100 from surfstudio/add-swiftpm-support
Browse files Browse the repository at this point in the history
Add swiftpm support
  • Loading branch information
LastSprint authored Oct 13, 2020
2 parents b9cf263 + 0cb6b72 commit 96ab437
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 0 deletions.
5 changes: 5 additions & 0 deletions NodeKit/Layers/Utils/LoadIndicatorNode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@
// Copyright © 2019 Кравченков Александр. All rights reserved.
//

#if canImport(UIKit)
import UIKit
#endif
import Dispatch

private enum LoadIndicatableNodeStatic {
static var requestConter: Int = 0 {
didSet {
#if canImport(UIKit)
DispatchQueue.main.async {
UIApplication.shared.isNetworkActivityIndicatorVisible = requestConter != 0
}
#endif
}
}
}
Expand Down
25 changes: 25 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"object": {
"pins": [
{
"package": "Alamofire",
"repositoryURL": "https://github.com/Alamofire/Alamofire",
"state": {
"branch": null,
"revision": "163db02519e6f89dcbc57126bd5b17f729b81988",
"version": "5.0.0-beta.6"
}
},
{
"package": "CoreEvents",
"repositoryURL": "https://github.com/surfstudio/CoreEvents",
"state": {
"branch": "add-swiftpm-support",
"revision": "c7c27f0db03c75cd39476e58a0a42ac5e2c66be5",
"version": null
}
}
]
},
"version": 1
}
43 changes: 43 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// swift-tools-version:5.3
import PackageDescription

let package = Package(
name: "NodeKit",
platforms: [
.macOS(.v10_12),
.iOS(.v11),
],
products: [
.library(
name: "NodeKit",
targets: ["NodeKit"]),
],
dependencies: [
.package(url: "https://github.com/Alamofire/Alamofire", .exact("5.0.0-beta.6")),
.package(url: "https://github.com/surfstudio/CoreEvents", .branch("add-swiftpm-support")),
],
targets: [
.target(
name: "NodeKit",
dependencies: [
"Alamofire",
"CoreEvents",
],
path: "NodeKit",
exclude: [
"Info.plist",
]
),
.testTarget(
name: "IntegrationTests",
dependencies: [
"NodeKit",
],
path: "IntegrationTests",
exclude: [
"Info.plist",
"Resources/LICENSE.txt",
]
),
]
)

0 comments on commit 96ab437

Please sign in to comment.