So, I am not sure if this is the actual solution yet, but the error went away, when I did the following.
Click on your project, go to General tab, at the bottom you have Frameworks, Libraries and Embedded Content, click on the + and add the FirabaseFirestore.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: