I’m optimizing my app dimension and encountered an issue with spm: how can I create a shared(between foremost app executable and app’s extensions) frameworks with its personal sources? I created a easy undertaking to breed my downside: empty SwiftUI undertaking with a widget extension and a package deal ‘Assets’, right here is the outline of the package deal:
let package deal = Bundle(
identify: "Assets",
platforms: [.iOS(.v15)],
merchandise: [
.library(
name: "Resources",
type: .dynamic,
targets: ["Resources"])
],
targets: [
.target(
name: "Resources",
dependencies: [],
path: "Sources",
sources: [
.process("Resources")
]
)
]
)
each foremost and the widget targets embrace the library “Assets” of their “Frameworks, Libraries and Embedded content material”, foremost goal embeds it and the widget goal would not(Don’t embed possibility).
right here it the screenshot of this part for the primary goal
I count on that Xcode will create a separate sources framework with a Assets.bundle included in it. As an alternative of it I see duplicated Assets.bundle in each targets. What do I perceive flawed?