Swift Package Manager is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.
Xcode 11+ is required to build TombitKit using Swift Package Manager.
To integrate TombitKit into your Xcode project using Swift Package Manager, add it to the dependencies value of your Package.swift
:
import PackageDescription
let package = Package(
name: "MyLibrary",
// 🐶 make sure that avaliable iOS version is 13+
platforms: [.iOS(.v13)],
products: [
.library(
name: "MyLibrary",
targets: ["MyLibrary"]),
],
dependencies: [
// 🐶 add codes below.
.package(url: "https://github.com/applebuddy/TombitKit.git", from: "1.0.0")
],
targets: [
.target(
name: "MyLibrary",
// 🐶 you can add dependencies to use that library in your target.
dependencies: ["TombitKit"]),
.testTarget(
name: "MyLibraryTests",
dependencies: ["MyLibrary"]),
]
)
If you prefer not to use either of the aforementioned dependency managers, you can integrate TombitKit into your project manually.
import TombitKit
public class MyLibrary {
public private(set) var text = "Hello, World!"
public private(set) var response: UpbitAccountsListResponse?
public init() {
Task {
do {
guard let response = try await TombitAPIManager.shared.requestUpbitAccountsInfo(
apiAccessKey: "",
apiSecretKey: ""
) else {
return
}
print("response : \(response)")
self.response = response
} catch {
print("error : \(error)")
}
}
}
}
TombitKit is released under the MIT license.
link |
Stars: 0 |
Last commit: 2 weeks ago |
first release version v1.0.0
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics