Skip to content

Commit 0c879ff

Browse files
authored
Merge pull request #13 from sadeghgoo/develop
Now you can use SPM(Swift Package Manager) to add MagicTimer to your projects.
2 parents d794676 + 0063ff0 commit 0c879ff

File tree

4 files changed

+52
-0
lines changed

4 files changed

+52
-0
lines changed

.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// swift-tools-version:5.5
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "MagicTimer",
8+
products: [
9+
// Products define the executables and libraries a package produces, and make them visible to other packages.
10+
.library(
11+
name: "MagicTimer",
12+
targets: ["MagicTimer"]),
13+
],
14+
dependencies: [
15+
// Dependencies declare other packages that this package depends on.
16+
// .package(url: /* package url */, from: "1.0.0"),
17+
],
18+
targets: [
19+
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
20+
// Targets can depend on other targets in this package, and on products in packages this package depends on.
21+
.target(
22+
name: "MagicTimer",
23+
dependencies: []),
24+
.testTarget(
25+
name: "MagicTimerTests",
26+
dependencies: ["MagicTimer"]),
27+
]
28+
)

Sources/MagicTimer/MagicTimer.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
public struct MagicTimer {
2+
public private(set) var text = "Hello, World!"
3+
4+
public init() {
5+
}
6+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import XCTest
2+
@testable import MagicTimer
3+
4+
final class MagicTimerTests: XCTestCase {
5+
func testExample() throws {
6+
// This is an example of a functional test case.
7+
// Use XCTAssert and related functions to verify your tests produce the correct
8+
// results.
9+
XCTAssertEqual(MagicTimer().text, "Hello, World!")
10+
}
11+
}

0 commit comments

Comments
 (0)