This error occurs when using iOS 16 with XCode 14.
As a workaround, please open XCode and go to Product > Scheme > Edit Scheme. Then navigate to Run > Diagnostics and deselect Thread Performance Checker. This should solve the issue.
Alternatively, you could also downgrade your XCode to a previous version to avoid this error.