I have been searching an answer to this, and I assume there is a way to do this but haven't succeed in finding it. I have a Package.swift which looks something like this, simplified for illustration purposes.
let package = Package(
name: "Core",
platforms: [
.macOS(.v10_14), .iOS(.v12)
],
products: [
.library(
name: "Core",
targets: ["Core"]
)
],
dependencies: [
// some package dependencies here.
],
targets: [
.target(
name: "Core",
dependencies: [
"BinaryFramework",
"BinaryFramework2",
]
),
.testTarget(
name: "CoreTests",
dependencies: ["Core"]
)
]
)
The folder structure is like this on disk.
. βββ Frameworks β βββ Build β βββ iOS β βββ BinaryFramework.framework β β βββ BinaryFramework β β βββ Info.plist β β βββ Modules β β βββ module.modulemap β βββ BinaryFramework2.framework β βββ BinaryFramework2 β βββ Headers β β βββ FrameworkHeader.h β βββ Info.plist β βββ Modules β βββ module.modulemap βββ Package.resolved βββ Package.swift βββ README.md βββ Core.xcodeproj β βββ project.pbxproj βββ Sources β βββ RideCore β βββ Private β β βββ Connector.swift β β βββ Decodable.swift β β βββ JSONRequest.swift β βββ Public β βββ Common β βββ AuthenticationService.swift β βββ Exceptions.swift βββ Tests β βββ CoreTests β βββ AuthenticateTests.swift β βββ BasicNetworkTests.swift βββ ToDo.txt
The frameworks are built already and I don't have the source so I can't import it as a package. These are not C system libraries. I tried looking at linkedFrameworks and importing dependencies as shown in the Package.swift file above but it does not find the files. Any assistance would be appreciated. Thanks.