Xcode Simulator doesn't work with Unity build

I’ve made a build of my Unity app.
(Lion, Unity 4.0, Xcode 4.5.2)

I brought it into Xcode to see what it would look like on Simulator.

It gives me no option other than “iOS Device”. I do not have the option of viewing it on Simulator.
When I hit “Run”, I’m given a popup:
Xcode cannot run using the selected device.
No provisioned iOS devices are available with a compatible iOS version. Connect an iOS device with a recent enough version of iOS to run your application or choose an iOS simulator as the destination.”
(Yes, I’d like to select the simulator, unfortunately, it doesn’t give me the option).

I then started just a generic app project in Xcode, and it gives me the options of:
“iOS Device, iPad 6.0 Simulator or iPhone 6.0 Simulator”.
I can view a generic Xcode app on Simulator just fine. Simulator works.

But why can’t I view the Unity build with Simulator?
Am I missing a step in Unity or Xcode?

I have screen caps:
First ones is the Unity build.
2nd is the xcode app that works fine.


Ok, I figured it out for myself.

In Unity, you must click on Build Settings > Player Settings
And in Inspector, choose settings for iOS > Other Settings > SDK Version and make sure “Simulator SDK” is selected.

Now in Xcode, it can be viewed in the iPhone Simulator.

Holy cow! I spent a day messing with Xcode. I never would have figured this out. Works great now. Many thanks!

Strangely I’m getting errors in UnityMetalSupport.h although I don’t use Metal after all. This file comes in Unity>Classes> and is part of the Cardboard SDK. Which is weird because I don’t have any Cardboad SDKs in my project. I’m using Unity 5.3 any hints?

Thanks in advance