Raja Saad
Raja Saad

Reputation: 454

Issues Importing a Framework with Dependencies in Swift

I'm currently developing an umbrella framework in Swift, where one framework is dependent on another framework. Specifically, I have a framework (let's call it MainFramework) that depends on another framework (DependencyFramework).

While trying to integrate MainFramework into my test project, I encountered the following errors:

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

MainFramework.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface:7:8

No such module 'DependencyFramework'

I ensured that MainFramework is correctly set up to include DependencyFramework as a dependency.

Additional Information:

What could be causing these errors, and how can I resolve the issue of importing a framework that has dependencies on another framework? Any guidance or troubleshooting steps would be greatly appreciated!

Upvotes: -1

Views: 57

Answers (1)

Andrew_STOP_RU_WAR_IN_UA
Andrew_STOP_RU_WAR_IN_UA

Reputation: 11416

Xcode have buggy inplementation of swift packages support.

And XCode buggy from release to release :)

In such cases you need to clear packages cache and try to "update" and "resolve" packages. Sometime helps resolve, sometime - update, sometime - both. In some cases you need to do this manually several times.

enter image description here

Upvotes: 0

Related Questions