When creating an xcframework like this
xcodebuild archive -project endiosOne-iOS.xcodeproj -scheme EOFoundation -destination="iOS" -archivePath /tmp/xcf/ios.xcarchive -derivedDataPath /tmp/iphoneos -sdk iphoneos SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES
xcodebuild archive -project endiosOne-iOS.xcodeproj -scheme EOFoundation -destination="iOS Simulator" -archivePath /tmp/xcf/iossimulator.xcarchive -derivedDataPath /tmp/iphoneos -sdk iphonesimulator SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES
xcodebuild -create-xcframework -framework /tmp/xcf/ios.xcarchive/Products/Library/Frameworks/EOFoundation.framework -framework /tmp/xcf/iossimulator.xcarchive/Products/Library/Frameworks/EOFoundation.framework -output /tmp/xcf/EOFoundation.xcframework
Then adding the framework to an existing project or a new project we get this error where we import the framework.
Failed to build module 'EOFoundation' from its module interface; it may have been damaged or it may have triggered a bug in the Swift compiler when it was produced
Using xcode 12.1, also tried with Xcode 11. Tried with new UIKit application and new SwiftUI only application
We get the following UIKit Errors UIKit Errors
I cant fix the UIkit errors as its in the UIKit: Unfortunately apple does not give us a lot of information on how to fix this.
How can I fix this so I use a xcframework that I have generated in another project?