How can I resolve this: Failed to build module 'FrameworkA' for importation due to the errors above

Viewed 570

The problem itself is simple to describe. I have two projects to create frameworks FrameworkA and FrameworkB. Framework B depends on Framework A. Both of which have a target with a run script(Run_Script) to spit out a xcframework in their respective project root directory. I add the product FrameworkA.xcframework as a dependency to FrameworkB. As expected, I can import and use FrameworkA and build Framework B and it's xcframework generating target. So far so good.

Now I add a Swift package (doesn't matter what package) to Framework A, try and build Framework B. I cannot build FrameworkB. due to error below:

Failed to build module 'FrameworkA' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug

Failed to build module for importation

and in arm64-apple-ios-simulator.swiftinterface arm64-apple-ios-simulator.swiftinterface

Is this a compiler bug as XCode warns? I have created a sample project to illustrate this issue. TestXCF

The first commit compiles and the last fails. Using XCode 13.3, default toolchain

0 Answers
Related