简体   繁体   中英

How can I choose an iOS simulator as the destination in Xcode?

I am an iOS noob. I had a project running on the iPhone simulator in Xcode 4.4. To resolve a different issue, I un-installed 4.4 and then installed 4.5.1. Now when I try to run my project on the simulator I get an error "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."

How do I choose an iOS simulator as the destination?

Where do I click?

There should be a menu in the top left region of the toolbar section of the IDE. It should have a run button, a stop button, and then the name of your app and a label saying IOS Device. Click view-->show toolbar if you don't see it. Click on IOS Device and you should get a drop down menu of devices. The simulator should be in that list.

应该这样做

This should do it, its very simple actually

Just in case anyone finds this helpful --

Sometimes your version of xCode doesn't support the deployment targets.

My iOS simulator did not show up as a destination until I set the deployment target down to 7.0 (it seems like 7.1 may not be supported by xCode 5.0, but only 5.1 [not confirmed]).

Hope that helps if anyone stumbles across it.

For me the problem was that the selection in the toolbar only shows up for a certain width of the XCode window

I was able to add devices to the Simulators list by clicking on Window->Devices ( Shift+Command+2 ), and clicking on the + at the bottom left to add Simulators. After you click on Create, the device(s) will show up

Make sure to set Supported Platforms correctly

XCode 显示支持的平台

I had the same issue. The simulator would run a different device than chosen in the size field under "Simulated Matrix".

I dug around and found in Xcode's menu: Product/Destination. screenshot I was then able to run the simulator for the correct size.

Hope this helps !!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM