I just want to use some code from other SPM packages, for example, I want to include SwiftJWT
import AWSLambdaRuntime
import SwiftJWT
Lambda.run { (context, name: String, callback: @escaping (Result<String, Error>) -> Void) in
/// some code that are using SwiftJWT
}
I added a dependency:
import PackageDescription
let package = Package(
name: "ThePushLambda",
products: [
.executable(name: "ThePushLambda", targets: ["ThePushLambda"]),
],
dependencies: [
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "0.1.0"),
.package(url: "https://github.com/IBM-Swift/Swift-JWT.git", from: "3.6.1"),
],
targets: [
.target(
name: "ThePushLambda",
dependencies: [
.product(name: "AWSLambdaRuntime", package: "swift-aws-lambda-runtime"),
.product(name: "AWSLambdaEvents", package: "swift-aws-lambda-runtime"),
"SwiftJWT" // <--- After adding this line target becomes missing in the Xcode.
])
]
)
Actual behavior
After adding SwiftJWT dependency into the target dependencies list, the target becomes invalid in the Xcode.
Is it possible to use SPM packages other than swift-aws-lambda-runtime ?
Expected behavior
I just want to use some code from other SPM packages, for example, I want to include
SwiftJWT
I added a dependency:
Actual behavior
After adding
SwiftJWT
dependency into the target dependencies list, the target becomes invalid in the Xcode.Is it possible to use SPM packages other than
swift-aws-lambda-runtime
?