Steps to Fix:
- Convert to Group:
- In Xcode, right-click on your project folder and choose Convert to Group from the menu.
- Modify Project Settings:
- Right-click on your projectname.xcodeproj file and select Show Package Contents.
- Open the project.pbxproj file in a text editor.
Remove the following lines:
- minimizedProjectReferenceProxies = 1;
- preferredProjectObjectVersion = 77;
Update the version number by changing:
- Change objectVersion = 77; to objectVersion = 56;
If you have tests also convert them to group

made a video for this fix check it out https://youtu.be/WUvW3in1QVs