- Home /
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.
Damn, I knew the answer to that and you beat me to it. Lol.
Answer by ceminal · Jan 22, 2013 at 08:13 AM
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.
Thx! Wasted too much time on this before reading your post.
Thanks, bro. I was going almost crazy about it and reinstalling Xcode Like 5 Times until I found this.
This is still the only answer to this on the web. Thanks!
Answer by rgarrett7 · Aug 11, 2017 at 11:20 AM
Holy cow! I spent a day messing with Xcode. I never would have figured this out. Works great now. Many thanks!
Answer by MartinGebske · Oct 04, 2017 at 12:24 PM
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 Martin
Just delete the enum $$anonymous$$TLPixelFormat
in the Unity$$anonymous$$etalSupport.h
file and it works.
It show error on this line. typedef NSUInteger $$anonymous$$TLPixelsFormat; enum { $$anonymous$$TLPixelFormatBGRA8Unorm, $$anonymous$$TLPixelFormatBGRA8Unorm_sRGB, }; Here i change this typedef NSUInteger $$anonymous$$TLPixelsFormat; enum { mTLPixelFormatBGRA8Unorm, mTLPixelFormatBGRA8Unorm_sRGB, }; and my build run on emulator.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Error creating ios simulator build for facebook review 1 Answer
Xcode error dyld: symbol not found: _glbeginquery 0 Answers
Application quit shows error in iOS 1 Answer
Distribute terrain in zones 3 Answers