iOS destination simulators missing - xcode

I began typing up this issue and before I submitted it I solved the problem, but since it cost me all morning to resolve and I've seen it before, I figured I'd post it to help others out if they should run into the same issue.
I lost all the destination simulators in a single XCode project save for MacCatalyst and any physical devices. The cause was turning on Mac Catalyst. It's not quite that simple since I am using two different development computers running different version of MacOS. I was quite careful to not have the project open on the two different systems at the same time since that has caused other minor issues issues in the past as well.
I did some work on the second system to resolve issues with MacCatalyst, then closed that and returned to the original computer and discovered all the simulators were missing from the destination drop down. They're there under Windows -> Devices and I can add others but they never show up on the drop down. Other projects work fine.
I'll provide the solution below.

After trying restoring the project file and restoring XCode and deselecting Mac Catalyst all to no avail. I tried de-selecting iPhone and/or iPad and magically the simulators re-appeared. That's all it took.

Related

Failed to start remote service on device problem in xcode

I create a flutter app and now I'm trying to run it through XCode on my real iPhone, but after the installation finishes, I face the following problem:
Also with I trying to run the application on my real phone, after clicking on the application icon, I face a white screen appears, and then the application closes directly.
Catalina 10.15.3
IOS 14.2
XCODE 11.7
Also I was make a trust to app in phone
Does anyone know the reason for this problem?
This problem maybe because of two reasons:
First: Xcode 11.7 doesn't have support files for iOS 14 you can download it from here https://github.com/filsv/iPhoneOSDeviceSupport
Second: I have this problem now and I couldn't fix it.. but I have iPhone with iOS 14.2 and iPad with iOS 14 so the problem was just on the iPhone but after I updated the iPad with iOS 14.2 it happened with it.. so the problem maybe because of the iOS 14.2 so we have to wait for the update or because of the Xcode 11 version and we have to download the Xcode 12 version..
I hope we can find a solution quickly...
make sure to have the latest system update on your target device and the latest Xcode version as well. The error should disappear.
Best,
Ralf
I have fixed the problem by using the above solution but it has happened again. So, I have followed these instructions and fixed again:
https://stackoverflow.com/a/61665031/6586109
A good first place to look is Window > Devices & Simulators in xCode, then find the details for your device. There may be error information here that helps you find the fault.
Restarting devices and installing updates seem to fix this problem for a lot of people.
For me, there was a red notice in the device window about connection to the device and it turned out to be the cable that was at fault.
This was an official Apple cable, just a few months old, and still works fine for charging and data transfer; and I've been using it with xCode without problems for a couple of months. It seems to be possible for Apple cables to develop some tiny physical fault that seemingly only xCode is sensitive to.
Using a different cable worked first time for me.
There seem to be a few variations on the exact error message with the same root causes varying depending on exactly what xCode was trying to do at the exact moment it failed: I'm on xCode 12 and for me it was:
Failed to start remote service on device
Failed to start remote service com.apple.installation_proxy on device

On Starting mac and running xcode simulator Consume around 500MB Internet Data

For Past 4 week i observer when i run my Xcode application on simulator on first time simulator launch it consume around 500MB internet data.
This is not project specific issue. Every time when i shutdown and start the mac and run Xcode as soon as simulator open it will consume same amount of Data.
Can any one help me What is the issue?? or any background service run??
Xcode version: 11.6 (11E708)
simulator: 13.6
OSX: 10.15.6
Please help me unnecessary every time my Internet Data is consume i have to fix this
This issue is still persist after updating to xcode 11.7
Thanks For #Rado for suggesting the https://apple.stackexchange.com/.
After posting the question on https://apple.stackexchange.com/ i fond the answer.
Orginal Answer: Xcode simulator constantly download something
Answer:
rename the file com.apple.nsurlsessiond(Dont delete) in
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/UserEventPlugins/com.apple.nsurlsessiond.plugin/
to something -com.apple.nsurlsessiond
and also the file nsurlsessiond(Dont delete) in
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/libexec/
to something -nsurlsessiond
Apps with admob works perfectly also no problem with safari
If you don't need an internet connection for testing you application, you could simply disable the network.
You could run wireshark and see what it is actually doing, or at least see where it is connecting to.
I used tripmode firewall don't give simulator internet access only give when you need it.
Works fine but when you forget to turn it off and start the simulator next time, you feel horrible :(

Flutter - Disk Full Error - A Document Being Saved by xcdevice

I'm running into an issue where my iMac, with over 100G free, gets Disk Full Error after running Flutter for an hour or so.
When I reboot I get dozens folders in my Trash "Recovered Files" that are around 2G each.
The issue is actually described fairly well here (with screenshots): https://github.com/flutter/flutter/issues/56270
However, the moderator closed every comment as "off topic" (seems like several people are having this problem). So I figured it may be a good idea to bring this here to see if anyone else has found a solution for this?
I'm running VSCode and when I run Flutter Doctor I'm 100% compliant. Using the latest Flutter/Dart/MacOS/Xcode/Android Studio versions. I am primarily building my Flutter app to macOS platform (desktop).
I tried the suggestions in the above issue post and none of these worked for me (re-installing cocoa pods, re-installing Xcode, re-installing Android Studio).
I actually ran into this issue about a week ago. The comment linked to had put me on the right track, where they mentioned it only happens when they have an iOS device attached to their machine.
If you see something like this error in your VSCode output log when launching your app, then it's likely the same issue.
Failed _shouldMakeReadyForDevelopment
If you have a device attached and it's locked, I believe something in the Flutter env attempts a connection over and over causing these files to fill up.
However, this happened to me once even when I didn't attach a device and I found out it was because I had "wirelessly" attached a device in Xcode when I was doing iOS development for another project. So just sitting at my desk with my iPhone nearby was enough to cause it to try to connect over and over again, even if it wasn't attached.
I removed my iPhone from Xcode's wireless device list and that seems to fix it.
Can confirm, running flutter with an attached ios device eats disk space.
This is happening to myself and another developer on my team. I lost 200 GB of disk space yesterday. It's a frustrating productivity killer.
I am using the latest flutter
flutter doctor reports everything as fine
xcrun --find simctl is fine
Using Android studio 3.6.3
Latest patched Catalina 10.15.4
This morning I opened the Android Studio IDE with an android device and an ios device connected. I opened a get info window on my hard drive and left it open. Then I did nothing but watch the info window. No builds or anything. Over the course of a couple minutes, I watched 7 GB disappear.
I shut down the IDE and the loss stopped. I reopened the IDE with only the android device attached. I waited and watched for a few minutes. No loss of disk space.
Then I reopened the IDE with just an ipad attached and the losses started again. Then I unplugged the ipad and left the IDE open and the losses stopped.
Same here but happens also when just running Android Emulator.
This needs to be fixed A.S.A.P - its a dealbreaker!
When the problem happens and the disk runs full, my system slows down so much I can hardly do a thing. To free up disk space and get operational again quickly, there's two options:
Restart. Then the cache files are either deleted or end up in "Recovered Files" in Trash, as described by #william-t, from where you can delete them.
Directly delete the cache files in "TemporaryItems" (for me that's below /private/var/folders/bc/gw57z9dn4rn2v6df7306k9sh0000gn/T)
I know this is not a solution to the root cause of the issue, and it still helps a lot, as long as there's no true fix...

Xcode always freezes when switching branches

When using Xcode 8's built-in source control, switching between two branches almost always causes Xcode to freeze and requires force quitting the app. My branches aren't particularly worlds apart. Doesn't seem like it's guzzling excessive memory or CPU either. What's the deal?
Turns out this is a known issue in Xcode 8 and 8.1.
It may be that your workspace or project is saved in iCloud. I turned off automatic saving of Desktop folders to iCloud, and moved my workspace from iCloud to my local desktop, and it works fine now.

XCode "verifying application" step taking ages

The "verifying application" step of the build process in fully updated XCode 4.6 (and previously 4.5) often takes upwards of two minutes on my machine. Coworkers building the same application on similar computers have this step take only a couple seconds. My machine used to, as well, but does not anymore, for the past few months.
Does anyone know what could be causing this and how I can fix it?
Update your device to the latest version of iOS, 6.1.
Had the same issue, fixed after updating my iPad3.
Try rebooting your device.
I had the same problem using XCode 4.5.1 and an iPad 6.0.1, but didn't want to update at the time. In additional to a long 'Verifying Application' step, I noticed that copying resources over was also slower. After that, I disconnected the iPad and tried to delete my App, but discovered that even the device's delete alertview took several moments. So, obviously, for me, this was a device issue, and after performing a shutdown / restart of the device, xcode performed up to previously normal speeds.

Resources