We started migrating some of our projects lately from Cocoapods to SwiftPM, and faced exactly the same issue. Took many hours since the stacktrace was not giving enough information, and using reductio ad absurdum I managed to locate a problematic Swift Package (in my case it was the UIColor-Hex-Swift package). Weirdly enough, this issue is occurring only when used as Swift Package and not as a Cocoapods Dependency.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: