I'm having an issue related with the SPM with xcframework and third dependencies.
First of all I built my framework project that has a facebook dependency (through SPM).
Then I generated the xcframework.
xcodebuild archive \ -scheme TestSDKFramework \ -sdk iphoneos \ -archivePath "archives/ios_devices.xcarchive" \ BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ SKIP_INSTALL=NO xcodebuild archive \ -scheme TestSDKFramework \ -sdk iphonesimulator \ -archivePath "archives/ios_simulators.xcarchive" \ BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ SKIP_INSTALL=NO xcodebuild -create-xcframework \ -framework archives/ios_devices.xcarchive/Products/Library/Frameworks/TestSDKFramework.framework \ -framework archives/ios_simulators.xcarchive/Products/Library/Frameworks/TestSDKFramework.framework \ -output TestSDKFramework.xcframework
Uploaded to a private git the xcframework and the package that has the facebook dependency as well.
// swift-tools-version:5.3 import PackageDescription let package = Package( name: "TestSDKFramework", platforms: [ .iOS(.v13) ], products: [ .library( name: "TestSDKFramework", targets: ["TestSDKFramework"]) ], dependencies: [ .package( url: "https://github.com/facebook/facebook-ios-sdk", from: "8.1.0" ) ], targets: [ .binaryTarget( name: "TestSDKFramework", path: "TestSDKFramework.xcframework") ])
And finally consumed by the final client project as SP.
But then, when I try to compile the project the Facebook module was not found.
We tried to add the Facebook dependency in the final client project as well but does not work either.
How we can work with third dependencies like facebook inside a xcframework project? Any clues?