Errors happened because there was no .xcworkspace generated. I was able to solve this by following this amazing video on youtube: https://www.youtube.com/watch?v=CKvsG-_oIBM . After that, you will generate .xcworkspace file and not project one which will solve the errors.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: