You have to make sure that that the iOS Deployment Target
which can be found under Build Settings
-> Deployment
matches the iOS version running on your Simulator. I had the same issue as above because my iOS Deployment Target
was set to 18.2 while my simulator was running 18.0