In my experience, I solved the issue by taking the following steps:
Closing the Macro Project.
Resetting package caches: File -> Packages -> Reset Package Caches. Xcode will then automatically reinstall all the packages.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: