XCode 7. iOS simulators missing and not installable - xcode

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.

Related

Xcode 12.3 keeps freezing

I updated to the latest AppStore release of Xcode (12.3, 12C33).
It worked fine for an hour or two. After that it started to constantly freeze after being open for a few seconds to minutes.
I've tried the following, all without success so far:
restart macOS
clear derived data
tried with different projects
updating to latest macOS 11
Any other ideas or suggestions how to fix this?
Update
I can confirm that this is fixed in Xcode 12.5
I found an answer by Darr on the question "Xcode freezes after upgrade to 12.3" on Apple's developer forums that worked for me:
Unpairing my device connected via network and using only lightning cable seems to have resolved the issue for me.
Xcode > Window > Devices and Simulators > device > Connect via network
After going mad, I fixed this by removing all devices from Devices and Simulators (I had connect via network activated).
For now, it's working fine.
Power off your Apple Watch
Xcode may hang if the host Mac is connected to an iOS device which has one or more companion watches. The hangs occur when the watches aren't fully prepared for development, or if they are experiencing poor wireless connectivity. (72490921) (FB8945320)
Workaround: Power off the watches, or unpair them from the iPhone.
Xcode 12.4 Release Notes
You can force Xcode to freshly prepare a watch for development using these steps:
Force-quit Xcode.
Power-off and disconnect all iOS device from the Mac.
Reboot the Mac.
Launch Xcode, close all projects, and open the Devices and Simulators window.
Power-on and unlock an iOS device and its companion watchOS devices by entering the passcode as required.
Plug the iOS device into the Mac using USB cable.
Check each iOS device and each watch for any pairing request and approve the requests.
Monitor the status of device preparation in the Devices and Simulators window. If Xcode presents device-preparation errors, follow the guidance in the error message to resolve the error.
Once Xcode finishes preparing the iOS device and its companion watches for development, repeat steps 5 through 8 for each remaining iOS device and its companion watches until you verify that Xcode has prepared all devices for development. You may now open your Xcode projects and resume development.
I've been having the same problem. I had an iOS device connected via USB, unplugged it and it un-froze. Then I continued to have issue requiring force close each time.
I then clear derived data and things have been fine. I opened a StickerPack project and also had the same issue. Clearing DerivedData also fixed it.
Clear Derived Data:
Xcode pulldown menu > Preferences > Locations tab
Click the little arrow next to the path under Derived Data.
Delete the entire folder for you project. It will look like "MyAppName-bwonddotztrgkkfexrjxoncvmjit"
See this explanation about whether it's safe to delete DerivedData for your project.
I had the same problem with appstore version and someone advised to install from site, now it works fine. https://developer.apple.com/download/more/
Disable WLAN on my iMac fixes the problem currently.
Hope they will releast a fix very soon.
Xcode 12.3 is unstable and many times it crashes.
I reverted back to Xcode 12 and copied disk image of 14.3 in Device Support folder of Xcode (Contents > Developer > Platforms > iPhoneOS.platforms-DeviceSupport).
This I needed to debug on iPhone device having version iOS 14.3
https://github.com/mspvirajpatel/Xcode_Developer_Disk_Images/releases
I recently had similar situation. My Xcode 12.3 project could not be opened. I tried to open directly from popup that appears on start of the Xcode.
What worked for my was to downgrade Xcode to 12.2 and launch Xcode on new project. And then click my old one.
Maybe it would work without downgrading but I didn't check.
I had this problem too. I fixed it by going Devices and Simulators in the Windows file and disconnecting the iPhone reference I had for my phone when testing and app. Since the phone was no longer connected, its presence seemed to create a freeze.
In my case XCode 12.5 hangs/freezes on startup more or less instantly, right after it opens kind of an empty workspace.
I removed everything that I could imagine that deals with XCode on my machine, but it didn't help.
At the end I just used the hotkey for "Close Workspace" - Ctrl+Alt+Cmd+W
I hit this combo very often, very fast right after opening XCode and it worked!
The strange empty workspace showed up and closed instantly - now I could select other projects and everything works again.
There could be the multiple reasons and in my case reason was source control
preferences > Source Control > uncheck Enable source control
I have these performance problems with the newly updated Xcode from the AppStore to 12C33 (Xcode frozen for many seconds, instability of interface builder, etc.) only with apps which have frameworks added with cocoa pods and when working in the xcworkspace-file. (Integration of frameworks with Catharge even fail with error message 65). I'm running Xcode under macOS Catalina. Don't know what the technical reason could be, hence would appreciate if someone has an idea on this how to fix it.
Update: In the meantime I could fix it:
I eliminated my own devices from the device list and did then a deintegration and a new install of the cocoa pods for the projects. Afterwards I setup my devices again in the device list and all worked well again. Only eliminating and reintegration of my devices as described above didn't work in my case.

Xcode cannot run on simulator

in Xcode, I can see the simulators (in Window->Devices), however XCode itself will not recognize the simulator as an option to run on. Any ideas?
there may be two reason by which your Xcode not recognise simulator.
1.You have selected higher or lower version in development target.
Go to Xcode ---> window ---> Devices --> Add device on click + icon. it will be added a device on your Xcode .
Thanks
Enjoy coding.....

Xcode 5 IOS simulator black screen and app install fails

I just updated my xcode to work with ios7. Now whenever I make a new app, even if its set to build for ios7, I get an error in the simulator when running. It says that the install failed, even if I just made the project and haven't coded anything into it yet. The simulator also shows a black screen. I have tried the reset content, and it didn't work. I saw something somewhere saying to delete the Iphone Simulator folder in application support, but no such folder seems to exist. What can I try to do?
Update--
With some additional research, I found that Iphone Simultor is in the Xcode.app now, but I don't know what to delete. There are many files under the iPhone Simulator Folder. If I delete the actual app, it just doesnt open. Any ideas?? I dont even get an iphone on the screen, just a black window...
Update 2:
Even when I just go to open developer tools -> iphone simulator
it still gives me just a black screen....
Update 3
I just re-installed X-code, and all works now! Strange....I have no idea what happened...But I thought I would let y'all know for others who have similar issues.
Deleting the iOS Simulator folder of the iOS version in question in
/Users/xxx/Library/Application Support/iPhone Simulator
helps, but then you always have to repeat all the settings you made in the simulator (language, for example). Try to press the home button and then delete your app like you do it on a real iOS device. You should then be able to install it again.
This seems to be a known issue.
When simulator open - Go to iOS simulator tab -> reset content and settings..
Work for me.
Perhaps this answer will help?
The simulator should be in this folder:
/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iOS Simulator.app
Make sure any #try and #catch(NSException *exception) {} blocks are not commented or are working properly.
This is a version mismatch between your OS X version and your Xcode (iOS simulator)
and it seems that you have upgraded your OS X so Xcode needs to be upgraded as well, Check the versions that match with each other.
You need to upgrade your Xcode which will upgrade iOS simulator.
Good Luck,

Xcode 5 - "iOS Simulator failed to install application" every time I switch simulators

Using Xcode 5 GM, anytime I switch to the 5.1, 6.0 or 6.1 simulators to test, I get the error "iOS Simulator failed to install application." When I reset the simulator it works, but this is getting very tiring.
Anybody have a permanent fix or workaround?
Looks like this is a known issue. From the Xcode 5 release notes:
After switching the minimum deployment target of an application from
iOS 7.0 to a release prior to iOS 7.0, building and running the
application may fail with the message “iOS Simulator failed to install
the application.”
Go to the iOS home screen, click and hold the application icon, then tap the hovering “X” button to delete the application. 13917023
Another release note:
iOS Simulator
If an iOS app is detached, relaunching the same app from Xcode will
result in a black screen in the Simulator even though the new app is
launched. Terminate the app in the Simulator or relaunch it for the
second time. 14648784
Delete the old version app in your simulator (usually iOS 6.x).
Alternatively, header over to iOS Simulator - Reset Content and Settings.
This can be easier when you have a lot of apps on the simulator and can't remember which one you're currently working on.
You need to do this for every iOS Simulator version that causes the problem.
None of the other suggestions worked for me. However, after comparing my existing app settings to a new vanilla project, I noticed that the "Build" field for my Target was blank. Once I put something in that field, the app installed just fine!
if you have already developed project and you used xib to develop views then
X-Code > Inspector Selector Bar > Interface Builder Document > opens in > and change from Xcode Default(5.o) to Xcode 4.6 .
Build and Run your app it will run successfully, if it won't run again then, header over to iOS Simulator - Reset Content and Settings. delete old app from simulator then Run again.
i got the same problem but solved by following way....
Launch the iOS Simulator
Go and click "iOS Simulator" menu
Click "Reset content and settings"
Close simulator and rebuild your app.
Above screen shot is showing the way how you can do this...
I think this works for you...!!!
Deleting the app in the simulator works for me.
just wanted to add that this happen only if I open xib that created in xcode 4.6
If it's other files, this not happen
try this ....
in my case nothing have worked for me , after resetting the content simulator also , i am not able to install the app on simulator . after that i just changed my project location . i just moved the project to other location . then it installed successfully.
None of the above things worked for me. I just reinstalled xcode and it worked.
Ran into this issue today. Found it was an empty Reference Folder (blue folder) causing this. Removed the folder from Resources in Build Phase... cleaned build folder for the heck of it, and it went away.
/Users/YOURUSERNAME/Library/Developer/Xcode/ --> remove all contents of this folder, then simply launch the app from Xcode.
To check your Executable file settng ex.$(EXECUTABLE_NAME)
(Project setting - info property page)
I have different issue when getting error message “iOS Simulator failed to install application”, the reason is because I have added a property in App-Info.plist without any value. For instance, [Application Category] with no value. Thus the error will show up as well.
When I got this error, the image of the phone actually appeared, but the image of the app I wanted to test did not. Instead, I was on the main page of the phone that shows the apps you have. I fixed this problem by deleting the many icons that appeared on the start screens - about 30 of them. These had been created when I testing apps over the months. So, not saying its a solution, but it started working after I deleted the old app images.
For me it was -framework XCTest.
It made the app die with iOS Simulator failed to install application
and on the device Could not inspect the application package.
Removed it and now works.
You are using Xcode GM which is under beta stage. Use latest Xcode 5.1.1 available.
Also, these error occur while switching between simulator (32 bit and 64 bit).
Quit the simulator and re-build the application. OR
Reset simulator from "iOS simulator" -> "Reset content and settings.."
I changed my app name and bundle id midway. I happened to delete the Executable File name in my plist. I changed it back to "${EXECUTABLE_NAME}" (no quotes) and I'm back in business.

Can't run on device after installing iOS 4.2 and the 4.2 SDK

I installed iOS 4.2 on my 2nd-generation iPod Touch last week. I tried running my application on the device through Xcode, but it didn't work (because Xcode didn't yet support iOS 4). To solve that, I installed Xcode 3.2.5 and the iOS SDK 4.2. Now I can get the app to run in the iPhone/iPad Simulator just fine.
However, I can no longer select "Device" from the menu at the top of the screen. It's a choice, but when I try to click on it, it never actually gets a check mark.
Because of this, I can no longer run the app on my iPod. The other (related) problem is that I can't choose "Build and Archive" from the Build menu anymore because the target is not a device.
Why is this happening? Do I need to change some settings in my project, or something with my device itself?
EDIT: Upon closer investigation, it appears that I can't select anything but the iPhone Simulator 4.0. Maybe there's something wrong with the project file.
Check that the base SDK is set to Latest iOS (currently set to iOS 4.2) for your Xcode project and your target's product, then perform a rebuild and see if your iPod is recognized.
Also try visiting the Xcode Organizer and see if it's asking for anything from your iPod. Typically Xcode will want to collect some data from devices whose OS receive updates, so it can update itself and install your apps on the updated OS properly.

Resources