the code "import DomainParser" in my Swift file triggers a syntax error

47 views Asked by At

I'm trying to compile a GitHub Swift project on my MacBook. But there are many errors, the most significant is in the line: import DomainParser error is: No such module 'DomainParser'

Disclaimer: Swift, MacBook are new to me.

The readme file for this project states that I should execute the command: carthage bootstrap --use-xcframeworks So I added the Carthage packet and executed the command and it has built dependency declarations successfully. In my git project there is now a Carthage folder, which contains other folders, including Checkouts -> SwiftDomainParser -> DomainParser

So why is the import failing? Xcode setting? Path?

1

There are 1 answers

0
Tom On

In Xcode, I navigated to the project's target and added one new embedded content (scroll down the page in the General tab to find Frameworks, Libraries, and embedded content .) Any content will do. Then I deleted it. And lo and behold all the import errors disappeared.

I don't have a clue why. Perhaps this forced a refresh.