Xcode 9 Beta 3 - Where is iOS11 Simulator? - xcode

I have just installed XCode 9 beta 3.
But I don't see an iOS 11 version under Pref, Components.
How can I setup an iOS simulator?

1) Open the Devices and Simulators window:
Window -> Devices and Simulators
2) Click the plus in the lower lefthand corner
You will see dialog to add a new simulator
3) Select a device (i.e. iPhone 7) that supports iOS 11 and click create

I had a similar issue only seeing iPhone 5 and 6 sims and not able to create / download iPhone 7 simulator with iOS11. My solution was to move Xcode 9 beta 3 from the downloads folder into the Applications folder along side xcode 8. I didn't realise it was still in the DL folder. Once launched from the Applications folder Xcode 9 beta 3 loaded with all the sims in place. Worth checking if your's is still in the downloads folder too with a previous version of Xcode in the Applications folder.

Follow these steps to add a (new) simulator
Click on Simulator icon and open simulator list.
At the end of list, there is an option to add new simulator "Add Additional Simulator". That will open 'Device & Simulator' window.
Switch to 'Simulator' tab.
There are three field in simulator tab.
Click on '+' icon, on left bottom corner of window.
Simulator Name: Enter simulator name here
Device Type: Select iPad from this dropdown list
OS Version: Select OS version from this dropdown list
Click on 'Create'
A new simulator will be added in your Simulator option list.
Look at this snapshot to understand flow of above steps:
And if there is no simulator/OS version in simulator list, you're looking for,
Click on Simulator icon and open simulator list.
At the end of list, there is an option to add new simulator "Download Simulator". That will open 'Component' window (from Xcode >> Preferences).
Select/click simulator from list, which you need to download.
Look at this snapshot:

Related

How do I run an iPad Simulator in Xcode?

I am trying to run an iPad simulator on Xcode, but currently I only have one option when I go to Xcode > Open Developer Tool > Simulator, which launches the iPhone simulator.
How do I launch the iPad simulator?
You should select an iPad device by navigating to
Hardware/Device/[OS version if you have multiple OS versions installed]/[device]
in the simulator's menu.
If there are no iPad devices in the list, follow these instructions:
Click on Hardware/Device/Manage Devices...
Select the Simulators option on the top.
Press the plus (+) sign in the lower-left corner.
Define the name, the device type and the OS version of the new simulator, then click on Create.
For more information, check out Getting started in Simulator.
This is for Xcode 11.2.1+
open XCode, from the App menu:
Xcode -> Open Developer Tool -> Simulator
This will open the latest iPhone simulator and to change it to anything else e.g iPad:
Hardware -> Device -> iOS -> iPad
This has changed.
Now, after you opened your simulator as you mentioned you need in the simulator menu bar to go to:
File -> Open Simulator -> [ios version] -> [ios device]
There you can find an ipad simulator to open.
For bonus points :)
I would also extract the simulator from inside Xcode to make it more accessible.
Applications / Xcode.app ( right click and select "Show Package Contents" )
From this folder Contents / Developer / Applications / Simulator.app
Create a shortcut to that and simulator opens without opening the main Xcode.app
Open Simulator, go to File > Open Simulator > {Your version of IOS} > {Device you want}.
Dont Forget to rebuild your app before trying to launch it.

Build/refresh on multiple simulators at once with Xcode 9 with a single build?

Xcode 9 supports multiple simulators. That's great! I can choose the simulator, click run, choose another one, click run, and see both simulators open.
Is there a away that I can 'refresh' all open simulators when building and running? Say I have an iPhone X and a iPhone 7 simulator open. I want to be able to do something ala 1) have two simulators open and running. 2) Click Run 3) See both simulators refresh and update.
Till now , its not possible to debug in both simulators at the same time. You can only check UI , if you add a new simulator the instance of previous will be ended

The Simulator select button can't find

My Mac system is El Capitan 10.11.2,in Xcode 7.2,I can look the simulator; but when I install Xcode 6.4,open project (every project like it),I can't find Simulator button.
Go to Window and then Devices, check if it appear there and if not - click the + icon in the lower left

Can I set the default simulator for new projects in Xcode 7.1 or latest?

I've been making a ton of new projects as I'm learning Swift. My development is all on my laptop, so I hate using the default 6s Plus simulator, since the window is too big to easily see. Is there a way to change the default simulator to be a different one for new projects?
No need to delete simulators!
Product → Destination → Add Additional Simulators...
In the sidebar, select the simulator you want to hide
Uncheck "Show as run destination"
Edit: Updated for Xcode 10
You can select the desired simulator via the Hardware > Device > [OS] menu (Xcode 9):
While unchecking "Show as run destination" hides the simulator, this will also change the default value.
Updated image for Xcode 11.5
Xcode 9 UPDATE:
In Xcode 9, no need to delete simulators, and the way to turn them on/off is to go in Product/Destination/Add Additional Simulators... select the simulator you want to turn off, then uncheck the box: 'Show as run destination'
No. But...
If you don't like the size of the 6s plus simulator, make it smaller with the simulator Window Scale menu.
If you don't like the 6s plus simulator at all, delete it with the Xcode Window Devices menu.
Xcode 12.5
In Xcode, go to Product -> Destination -> Choose Destination menu and selecting the device you'd like to be your default.
The original answer could be found in apple support forum here: Apple support forum,
In addition if you want to make the device smaller just hover over bottom right corner of the simulator and you will see the resize option
Deleting the simulators you don't want will default you to the simulator you do want. I also develop on my laptop and the biggest simulator I can see w/o scaling down is the 4S, so I deleted simulators for iPhone 5 and above and now every project I create defaults to 4S simulator. If I ever need the newer simulators, I will just re-download.
In my case, just select the device in Product → Destination, Xcode 12.4
Xcode version 11.5
On Simulator > File > Open Device > iOS 13.5 > Change the default Simulator
Xcode(v11.5)
open your simulator, choose **File/Open Device/iOS 13.5/iPhone8 ** will change your simulator device to iPhone 8.
When you reopen your simulator, iPhone 8 will be your device simulator.

XCode 7. iOS simulators missing and not installable

Can't see any iOS 9.0 simulators. In previous Xcode 7 beta 3 all was OK.
Can't install iOS 8.3 simulator.
Also I can't add any simulator from 'Organizer'. By pressing "Create" nothing happened.
Each time when I'm trying to download iOS simulator I see next thing:
One possible issue is that there may be old leftover simulators installed, which are not compatible with the new XCode, and their presence causes the whole Simulator to fail. To get rid of them, delete the simulators in /Library/Developer/CoreSimulator/Profiles/Runtimes (for me there was an iOS 7 simulator there which was the issue). Relaunch XCode after this.
Then try to run the simulator from XCode->Open Developer Tool->Simulator. Assuming this succeeds, verify that you have the simulators under the iOS Simulator menu Hardware->Device->Manage Devices… – if not, you should be able to click the + in the bottom bar to add yourself some iOS 9 simulators. Relaunch XCode again and they should show up in the menu.
In my case was with Xcode 8.2, what it worked to me was changing Deployment Version:
After setting another different than 10.0 then appeared back all simulators again.
Have you tried going to Xcode > preferences > downloads and trying to re-download the simulators you want?
For me it was only showing one simulator,
and when I go to Xcode > Preferences I can see the simulator is already downloaded but it is not showing up in the list,
if you're facing something similar. This is how you should add required simulator,
From the Xcode menu, open Windows > Devices, shown in the image below
you should see this screen,
notice there is only one simulator (ref: first image)
Now to add required simulator, you should click on the + (in the left corner)
You should see this,
You can choose the simulator from the list, In my case it is iPhone 6s Plus.
In Xcode you can see additional simulator iPhone 6s Plus,
I was also not able to see simulators.Reason is,I have not restarted system after upgrading Xcode.I restarted & simulator started displaying as routine.
There is a bug in the latest El Capitan beta which causes a process to crash when dlopen() fails to mmap() a dynamic library. Such mmap() failures can occur due to code signature verification failures.
These mmap() failures will occur if older iOS Simulator runtimes are present on disk (ie: installed from Xcode 6.x), and that is the reason why Xcode 7 beta release notes have indicated that earlier runtimes are not working in Xcode 7. The iOS 8.x Simulator runtimes were updated in newer downloads, but if the older versions are present on disk, they will cause the mmap() failure, which in the latest El Capitan beta, unfortunately results in the CoreSimulatorService repeatedly crashing which in turn results in no simulators being available.
If simulators are suddenly disappeared:
Just consider decreasing Deployment target to a minor version below current version in Project > Build Settings > Deployment Info > Deployment Target
P.S. Usually you see a place holder text showing the selected version (in gray) in the box denoted above. If for example the gray text says 9.3, then decrease it to 9.2.
Look at seancook's response in the middle of this page... it seems to have fixed this issue for several people.
https://forums.developer.apple.com/thread/11706
Edit:
This can also be fixed by booting into recovery mode (CMD - R) and reinstalling El Capitan.
Go to Windows. Select Devices. Select '+' from left bottom and add all simulators one by one.
I had changed the name of my Project from Finder. I clicked on the old project name (between the Play Button and and the selector for the desired Simulator or Device), selected edit schemes, selected the Targets Tab, and realised that the old scheme was missing so I just added my new Project name by clicking on the plus button and the simulator list reappeared.

Resources