I'm a fresh user for xcode,and this my first time to try to public my unity game to ios. I make a empty unity project, set the simulator sdk option true in unity, export the project to xcode,but I can't run the game because xcode report "A build only device cannot be used to run this target." every time.I have no idea to solve it after I search so many key worlds in web.I can write a hello world app working well in simulator,but I don't known how to make unity project in xcode work. I need help,any one can tell me why this happend and how to solve? unity 22.3.17 and xcode 15.2.Simulator is running,iPhone15 pro max - iOS 17.2.Macbook Air(M1),14.1.1.
Here is some screen shot(may be useful?)
unity build setting shotcut
xcode error report and options
Very Thanks!🙇♂️
1.download unity 22.3.17 and install with ios exporter.
2.creat a 2d template project.
3.make simulator sdk option selected in Unity buildsetting.
4.export the xcode project
5.open xxx.xcodeprj
6.click run button
7.see the error
I keep simulator running while I do the steps.The vitual machine is iPhone15 pro max - iOS 17.2.
Click the Xcode > Product > Destination > Destination architectures >both,then all things ok. UnityProject is x86 and xcode not show arm simulator default.