So the problems was I added Swift files in VSCode and it was not added in the scope of the project in ios. Open the project in xcode and added those files in scope fixed the issue