I need to use plugins from two libraries from same developer. I was using amplify sdk to use cognito plugin. In relation to another task I need aws lambda also which is part of the internal sdk(aws-sdk-swift) of amplify but is not directly accessible. In that case I tried to include aws-sdk-ios-spm with which I can access lambda plugin. However since both these libraries contain same modules, I am getting duplicate errors. Question is how can I include necessary plugin from these libraries inside package,swift instead of including entire library?
import PackageDescription
let package = Package(
name: "rp_ios_core",
platforms: [.iOS(.v14)],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "Utilities",
targets: ["Utilities"])
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(url: "https://github.com/aws-amplify/amplify-swift.git", from: "2.6.0"),
//.package(url: "https://github.com/aws-amplify/aws-sdk-ios-spm",
from: "2.30.4")
],
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 this package depends on.
.target(
name: "Utilities",
dependencies: [
"Common",
.product(name: "AWSCognitoAuthPlugin", package: "amplify-swift"),
.product(name: "Amplify", package: "amplify-swift"),
// .product(name: "AWSLambda", package: "aws-sdk-ios-spm")
],
path: "Sources/Utilities"
),
.testTarget(
name: "rp_ios_coreTests",
dependencies: [ "Utilities"]),
]
)