Open
Description
Hi, all.
I have a xcframework that has a dependency on 'SDWebImageSwiftUI'. I deployed it through SPM, and I downloaded it with SPM in another project.
When I build it, it shows 'Missing required module 'SDWebImage'' error at the xcframework's swiftinterface file.
Below picture is a swiftinterface file of my xcframework.

Steps to reproduce
- Create project that depends on 'SDWebImageSwiftUI'.
- Create xcframework from that project.
xcodebuild archive \
-workspace SimpleFramework.xcworkspace \
-scheme "SimpleFramework" \
-destination "generic/platform=iOS" \
-archivePath "./SimpleFramework-iphoneos.xcarchive" \
-sdk iphoneos \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
xcodebuild archive \
-workspace SimpleFramework.xcworkspace \
-scheme "SimpleFramework" \
-archivePath "./SimpleFramework-iphonesimulator.xcarchive" \
-sdk "iphonesimulator" \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
xcodebuild -create-xcframework \
-framework "./SimpleFramework-iphoneos.xcarchive/Products/Library/Frameworks/SimpleFramework.framework" \
-framework "./SimpleFramework-iphonesimulator.xcarchive/Products/Library/Frameworks/SimpleFramework.framework" \
-output "./SimpleFramework.xcframework"
- Embed xcframework in Swift package and deploy.
// swift-tools-version: 6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "SimplePackage",
platforms: [.iOS(.v16)],
products: [
.library(
name: "SimplePackage",
targets: ["SimplePackage"]),
],
dependencies: [
.package(url: "https://github.com/SDWebImage/SDWebImageSwiftUI", from: "3.1.3"),
],
targets: [
.binaryTarget(
name: "SimpleFramework", // My Framework that has dependency on SDWebImageSwiftUI
path: "Sources/SimpleFramework.xcframework"
),
.target(
name: "SimplePackage",
dependencies: [
"SimpleFramework",
"SDWebImageSwiftUI"
]
)
]
)
- Download swift package from another project and import my framework.
I've checked 'SDWebImage' is downloaded. How can I fix this? Is there anything wrong with the setup? I also tried adding depdency of 'SDWebImage' in Package.swift file, but error remains same.

Metadata
Metadata
Assignees
Labels
No labels