When I clone an open source project from Github, this error happen.
For me it just works after updating the target iOS like this:
- Update the Deployment Target:
- open the project on Xcode then, click of the project name in files.
- select General tab from the list in the middle.
- Under Minimum Deployments change iOS to iOS15 or above.
- Clean the Build Folder:
- Select Product from the top list then choose Clean Build Folder..
now run your code again, it should work :)