Add Japx as a dependency in your Package.swift file using the following URL and version requirement:
.package(url: "https://github.com/infinum/Japx.git", .upToNextMajor(from: "4.0.0"))
Selecting Products
Depending on your requirements, you can choose specific products from the Japx package:
| Requirement | Product Name | Import Module |
|---|
| Pure Japx | Japx | import Japx |
| Alamofire | JapxAlamofire | import JapxAlamofire |
| Alamofire + RxSwift | JapxRxAlamofire | import JapxRxAlamofire |
| Moya | JapxMoya | import JapxMoya |
| Moya + RxSwift | JapxRxMoya | import JapxRxMoya |
let package = Package(
name: "YourDependency",
products: [
.library(name: "YourDependency", targets: ["YourDependency"])
],
dependencies: [
.package(url: "https://github.com/infinum/Japx.git", .upToNextMajor(from: "4.0.0")),
],
targets: [
.target(
name: "YourDependency",
dependencies: [.product(name: "Japx", package: "Japx")]
)
]
)