Xcode xcframework errors, like Unknown attribute 'Combine.Published'

Viewed 389

I'm trying to compile my framework into an xcframework, which I do with the following script:

xcodebuild archive \
  -scheme CleanUI \
  -configuration Release \
  -destination 'generic/platform=iOS' \
  -archivePath './build/CleanUI.framework-iphoneos.xcarchive' \
  SKIP_INSTALL=NO \
  BUILD_LIBRARIES_FOR_DISTRIBUTION=YES

xcodebuild archive \
  -scheme CleanUI \
  -configuration Release \
  -destination 'generic/platform=iOS Simulator' \
  -archivePath './build/CleanUI.framework-iphonesimulator.xcarchive' \
  SKIP_INSTALL=NO \
  BUILD_LIBRARIES_FOR_DISTRIBUTION=YES

xcodebuild -create-xcframework \
  -framework './build/CleanUI.framework-iphonesimulator.xcarchive/Products/Library/Frameworks/CleanUI.framework' \
  -framework './build/CleanUI.framework-iphoneos.xcarchive/Products/Library/Frameworks/CleanUI.framework' \
  -output './build/CleanUI.xcframework'

This works completely fine until I import the CleanUI.xcframework into a test project. I get the following errors:

Enter image description here

Enter image description here

All those errors make no sense, at all. When I build the framework as a normal framework, with Cmd + B, everything works fine.

I deleted the derived data folder, cleaned every build folder and restarted my Mac like a thousand times. I have been working on this for the past 10 hours, I feel like I searched the entire web and tried every single possible solution.

0 Answers
Related