Recently have been working on this project just fine... had an app throw a warning for some malware called InstallCore. Removed the malware and now I am getting this on every preview, regardless of the device preview type.
I've tried clearing derived data, cache, etc. No dice.
Could not install the preview host "AppName.app" on iPhone 14 Pro Max: Failed to get parent identifier for BUNDLEIDENTIFIER.
I encountered a similar error after migrating from one mac to another. In my case, I reinstalled simulator and after that everything works fine. Here is the solution:
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorServicesudo rm -rf ~/Library/*/CoreSimulatorgo to Window->Devices menu in Xcode then add the wanted simulators by taping the "+" button in the lower left corner of the window. (post)