Failed to get parent identifier for BUNDLEIDENTIFIER.

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. 

Two things to try:

  1. Double check the Info.plist in your DerivedData for the app you're building. Is there a key for the bundle identifier? If so, what is the value?
  2. Otherwise, this sounds like your Xcode install might be invalid. I know this is a lot of work, but could you try deleting and re-installing Xcode?

I encountered a similar error after migrating from one mac to another. I found a solution in another topic: xcrun simctl --set previews delete all After that, the preview was rebuilt and works fine.

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)

I also encountered a similar error after migrating from one mac to another like @lenarsukhov mentioned. However, instead of having to run the xcrun simctl --set previews delete all command I just erased all content and settings in the simulator device menu and it fixed the issue for me.

Failed to get parent identifier for BUNDLEIDENTIFIER.
 
 
Q