Hi, I am new to creating packages and I am trying to wrap a closed source tracking library into a package to be used by our team to make a simpler interface and to prefix some organisation-specific prefixes to events and such.
The 3rd party lib consists of a number of libs, each has a .a-file and a .h file.
I'd like to provide a Swift interface where I call these libraries under the hood. I am able to make the package build and import and use the package in the main app, however the package does not seem to produce any -o files for the targets with the .a files, and I get
error: Build input files cannot be found: '(...)/Products/Debug-iphonesimulator/ACPIdentity.o', '(...)/Build/Products/Debug-iphonesimulator/ACPAnalytics.o', '(...)/Build/Products/Debug-iphonesimulator/ACPCore.o' (in target 'MyApp' from project 'MyApp')
Is this at all possible to get to work?
My package file:
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "Adobe-Wrapper",
platforms: [
.iOS(.v13),
],
products: [
.library(
name: "AdobeWrapper",
targets: [
"AdobeWrapper",
"ACPAnalytics",
"ACPCore",
"ACPIdentity"
]),
],
dependencies: [],
targets: [
.target(
name: "ACPAnalytics",
dependencies: [],
path: "./Sources/ACPAnalytics",
resources: [.process("libACPAnalytics_iOS.a")],
cSettings: [.headerSearchPath("./Sources/ACPAnalytics")]
),
.target(
name: "ACPCore",
dependencies: [],
path: "./Sources/ACPCore",
resources: [.process("libACPCore_iOS.a")],
cSettings: [.headerSearchPath("./Sources/ACPCore")]
),
.target(
name: "ACPIdentity",
dependencies: [],
path: "./Sources/ACPIdentity",
resources: [.process("libACPIdentity_iOS.a")],
cSettings: [.headerSearchPath("./Sources/ACPIdentity")]
),
.target(
name: "AdobeWrapper",
dependencies: [
.target(name: "ACPAnalytics"),
.target(name: "ACPCore"),
.target(name: "ACPIdentity")
],
linkerSettings: [
LinkerSetting.linkedFramework("libz.tbd"),
LinkerSetting.linkedFramework("UIKit.framework"),
LinkerSetting.linkedFramework("SystemConfiguration.framework"),
LinkerSetting.linkedFramework("WebKit.framework"),
LinkerSetting.linkedFramework("UserNotifications.framework"),
LinkerSetting.linkedFramework("libsqlite3.0.tbd"),
LinkerSetting.linkedFramework("libc++.tbd"),
]),
.testTarget(
name: "AdobeWrapperTests",
dependencies: ["AdobeWrapper"]),
]
)
file structure