FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Support for Swift Package Manager by janlionly · Pull Request #50 · radex/SwiftyTimer · GitHub

This repository was archived by the owner on May 1, 2026. It is now read-only.

Repository navigation

Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .md  (1) .swift  (4) .xcworkspacedata  (1) All 3 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 28 additions & 5 deletions Package.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,8 +1,31 @@
// swift-tools-version:5.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "SwiftyTimer",
dependencies: [],
exclude: ["Sources/Info.plist", "Sources/SwiftyTimer.h", "SwiftyTimerTests"]

)
name: "SwiftyTimer",
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "SwiftyTimer",
targets: ["SwiftyTimer"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "SwiftyTimer",
dependencies: [],
path: "Sources",
exclude: ["Info.plist", "SwiftyTimer.h"]
),
.testTarget(
name: "SwiftyTimerTests",
dependencies: ["SwiftyTimer"]),
]
)
7 changes: 7 additions & 0 deletions README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,13 @@ Just add to your Cartfile:
github "radex/SwiftyTimer"
```

#### Swift Package Manager
- iOS: Open Xcode, File->Swift Packages, search input **https://github.com/radex/SwiftyTimer.git**, and then select Version Up to Next Major **2.1.1** < .
- Or add dependencies in your `Package.swift`:
```ruby
.package(url: "https://github.com/radex/SwiftyTimer.git", .upToNextMajor(from: "2.1.1")),
```

#### Manually

Simply copy `Sources/SwiftyTimer.swift` to your Xcode project.
Expand Down
7 changes: 7 additions & 0 deletions Tests/LinuxMain.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import XCTest

import SwiftyTimerTests

var tests = [XCTestCaseEntry]()
tests += SwiftyTimerTests.allTests()
XCTMain(tests)
15 changes: 15 additions & 0 deletions Tests/SwiftyTimerTests/SwiftyTimerTests.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import XCTest
@testable import SwiftyTimer

final class SwiftyTimerTests: XCTestCase {
func testExample() {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct
// results.
XCTAssertEqual(SwiftyTimer().text, "Hello, World!")
}

static var allTests = [
("testExample", testExample),
]
}
9 changes: 9 additions & 0 deletions Tests/SwiftyTimerTests/XCTestManifests.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import XCTest

#if !canImport(ObjectiveC)
public func allTests() -> [XCTestCaseEntry] {
return [
testCase(SwiftyTimerTests.allTests),
]
}
#endif

Back | FazBrowse Home | New Git URL