Combine Unity Device Simulator builds in one xcode project?

I’d like to have one xcode project that can build for device or simulator. Is this possible? I know that unity can only export one player at a time, but I wonder if there might be a workaround:

In my current setup, I’m not actually using the project file that unity creates. I have my own Xcode project which includes the files that are exported from unity. I’m imagining that it might be possible to build two players to two different directories, one for device and one for simulator. Could my xcode project then reference files from both players, and then conditionally includes different files depending on the target platform?

Thanks!

Not sure if this is the cleanest way to do it, but here’s how I ended up doing this:

I wrote a unity editor script that builds two players. One builds to DevicePlayer, and one builds to SimulatorPlayer. My xcode project includes all the sources (.s, .mm, .h) from DevicePlayer. I then followed the instructions here to link with a different version of libiPhone-lib.a depending on whether i was targeting the device or simulator.

I also needed to follow these steps to make pinvokes work in the simulator.