Sigh. It started around 6 months ago and happened from time to time. For last 2-3 days I completely lost opportunity to debug on device. Whenever I'm trying it, I get infinite stuck on "Performing install actions" step. Sometimes, it ends with "unknown error occurred", sometimes with "Could not launch", sometimes it just stuck without any error.
I know the problem is in my specific iPhone, because it doesn't happen with another iPhones and it does happen with my iPhone on different machines.
What I've already tried and it sometimes helped me, but now it doesn't help at all:
restart XCode
restart Macbook
clean build folder/derived data (yeah, I'm an experienced iOS developer, so I've tried that)
unpair device and pair it once again (I should say, that previously I thought that was a silver bullet)
reinstall XCode
reinstall iOS Device Support
turn on/turn off Wi-Fi/Bluetooth
reboot iPhone
reset iPhone
reinstall provisioning profiles
pray
unpair Apple Watch
turn off Apple Watch
My setup: XCode 14.2 (tried different versions too, for example, XCode 13), iPhone 11 (iOS 16.2, started when I was on iOS 15)
Once again, I don't have any problems when I debug on Simulator on different device.
Any recommendations would be really appreciated, cause I'm already starting to lose my mind.
I updated my Xcode to Version 12.4 (12D4e) and after that I am unable to run my app on my device
iPhone X iOS 14.4.2.
Its alway show this Error
When I check my device connected status, Its show as connected
Action I applied
Clear DerivedData folder.
Unpair device and connected again.
Drank 20+ coffees.
I was able to fix the Xcode 12 app install/deployment issue described above:
Failed to start remote service "com.apple.debugserver" on device.
Domain: com.apple.dtdevicekit
Code: 811
Recovery Suggestion: Please check your connection to your device.
User Info: {
DVTRadarComponentKey = 261622;
}
...
by doing the following steps:
Quiting Xcode.
Deleting Xcode cache directory (ie, rm -rf ~/Library/Caches/com.apple.dt.Xcode).
Rebooting the offending iOS device.
Connecting the iOS device to Xcode by cable (instead of wireless network connection).
Starting Xcode again.
By the way, I've a setup very close to yours:
Xcode 12.5 (build 12E262) and
iOS 14.5.1 (on a iPhone Xʀ device)
1st solution
I fixed this by:
Closing Xcode
Deleting the current iOS version in my folder that's related to my device.
~/Library/Developer/Xcode/iOS DeviceSupport
Restarting Xcode. Wait a little bit for it to refresh and copy cache files in my case then Run.
Based on Can I delete data from the iOS DeviceSupport directory? it's ok to delete the iOS DeviceSupport folder.
I noticed when I did it and reconnected my device it re-downloaded the iOS device Support files.
If the support files don't download and the cache files are not copying, try restarting your computer as well.
I started also getting this error:
Errors were encountered while preparing your device for development.
Please check the Devices and Simulators Window.
Restart your phone and reconnect it to the compter if this happens. Then you should get a message in Xcode saying:
Preparing your phone for development.
2nd solution
Unpair the device in Xcode.
Clean the project.
Unplug and then restart iPhone.
Restart Xcode.
3rd solution
If none of the above worked, I was able to run the program by re-enabling Connect via Network.
After doing this now I can run project via USB.
4th solution
I submitted this bug to Apple. Apple also suggests this can be caused by faulty data cords. Maybe try another cord as well.
Unplug the iPhone, Turn it off and again turn it on and reconnect. It worked for me. Sometimes iPhone Debug connection network server clogs up. When you restart iPhone it reinitiate the connection.
This issue keeps happening and it seems like there's a myriad of reasons that may cause it, and so there are a lot of solutions that fixed it for people. Someone even suggested that none of the fixes actually work, and it's only the fact that time passes as we try different solutions that actually fixes it. Nevertheless, I will share what worked for me and what I found so far.
a. In the past, the issue was most often caused for me by using an older version of Xcode with a newer iOS. Apple doesn't always release the version of Xcode that supports the latest iOS at the same time, and this issue sometimes happens as a result of that. There are people who suggest right clicking the Xcode App > Show Package Contents > Developer > Platforms > iPhoneOS.platform > Device Support and renaming the folder for the latest supported version to the one running on the phone (for example renaming 16.0 to 16.1). I've had better luck with using the Beta of Xcode if it's not out yet (in this case using 14.1 RC2 instead of 14.0.1).
b. Incrementing the build number and setting a Display Name. This seems to have fixed the issue after nothing else worked. Again, this seems very random, so it could be unrelated, but it did fix it in my case after nothing else suggested on all the threads about this worked.
c. Deleting the profile in Settings > General > VPN & Device Management
Other suggestions I've seen across threads:
Restarting the device (seems to be the most popular solution)
Unpairing the device
Checking device status under Window > Devices and Simulators. There may sometimes be some further info about what is going on here, the device may still be preparing for development or downloading symbols or whatever
Using another cable. This never worked for me, after trying with 3 cables, 2 from Apple and one 3rd party, but others reported it worked
Deleting Derived Data (use Dev Cleaner or rm -rf ~/Library/Developer/Xcode/DerivedData
Uninstalling the app manually from the device
Resetting Network Settings
Force restarting the iPhone
Apple really needs better errors and less ridiculous bugs like this.
I had to update Xcode to fix this issue because my version of Xcode did not support my up-to-date iOS version.
I've had the same issue and also had the problem that I wasn't able to connect my device by cable (it popped on and of), so I had to use wifi connection on Xcode.
I was able to see the icon of the app created by Xcode on my iOS device, but whenever I tried to start it, it won't do so giving the "Untrusted Developer" error message.
I fixed this by going to:
Settings > General > VPN & Device Management > Developer App
Here you have to chose the App and consent to trusting it.
I reset the iPhone network settings and it works!
I have the same problem, my solution is update my ios version(15.1 to 15.2 beta)
I tried all the resolvent, nothing worked
restart iOS, Xcode, macOS
clear DeviceSupport, Caches
unpair iphone, change lighting cable
Then I find my ios version(15.1) does not exist in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport.
I try to fix it, but failed.
Finally, I can only update my iOS device to 15.2 beta version, It solved! Xcode is update to beta version too.
My devices original version:
iOS 15.1
Xcode 13.1 (13A1030d)
I'm on Xcode 13.3 and I fixed this by unplugging and plugging the cable between my MacBook Air and my mini iPad 3.
I fixed it by,
Following the steps : Window > Device and Simulator > Select your device and Right Click on it > Unpair after that re-connect your iOS Device then boom... Clean builds and run the app, it will work for you.
Upon solutions aren't working for me. Restart my iPhone then all well done.
Time to time, my Xcode starts freezing. Every few minutes for 5-30 seconds. I need to Force Quit as "application is not responding".
QUESTION
Is there any other way to fix this apart from removing connected devices as described here:
Xcode 12.3 keeps freezing ?
It says that even disabling "Connect via network" can help. But is there any other way? Because lets be honest - it is super convenient to test your app on real device without cables :)
Other things I have tried:
restarting Xcode
restarting MacBook
deleting everything in derived data folder
I recently downloaded the Beta version of Xcode 10. I opened an existing project and wanted to start it on a Simulator. But as soon as the Simulator started, may whole mac just froze. I could not do anything. The only thing that worked was moving the mouse.
After rebooting my Mac I thought the freezing was a beta bug in the Xcode 10 Release. So I went back to Xcode 9.4. But when I was using a small playground file, it happened again, while compiling the playground file. After another reboot I tried to recreate the issue with an existing Xcode project I had (the same I used for Xcode 10) but this time the simulator worked without any problems.
I am using:
MacBook Pro 2010
2.2 Ghz Intel Core2Duo Processor
16 Gb RAM
SSD Storage
Is my Mac just too old to work properly with Xcode or does anyone of you knows if this is an issue I can resolve?
I just ran into this (total system freeze, no pointer movement, nothing) with a single project on 10.14.0GM and Xcode 10, 10A255. I'd gone through and manually deleted the DerivedData folder, everything from the UserData folder except my theme, and DocumentationCache. No luck.
I then did a "Show Package Contents" on the project's .xcodeproj file and deleted everything but project.pbxproj and attempted opening again. Success.
I wasn't concerned with losing the auto-generated schemes on this very simple project structure; be aware that you may lose custom schemes and potentially other customizations related to project structure.
I'm seeing the same problem using Xcode 10.0 on a Mac mini (Late 2012) with 16 MB RAM and 2.3 GHz Intel Core i7.
I was using one simulator (an iPhone Xs Max) just fine for a couple of days, but when I changed to an iPhone 7 Plus (iOS 12), my whole computer froze with only the mouse pointer working. Switching back to the Xs Max simulator did not make the problem go away. Since I'm not using Playgrounds, switching to running on a real device instead of the simulator "fixed" the issue for me. Its not a real solution, but it keeps me from grinding to a halt until new versions of Xcode and Simulators come out.
I'm being annoyed by a warning dialog XCode 4 shows everytime I want to run the App I'm developing... it says:
"The Service is invalid.
Please check your setup and try again.
(0xE8000022)."
See image attached:
Sometimes the App will load on the iPhone 4, sometimes it won't. It's a huge waste of time! Please if anyone knows how to help it let me know.
I though it was because I enabled iOS Device Discovery to Support Wirelessly Connected Devices. When I saw it was an useless feature I disabled it, but still have the same dialog showing up.
Well, I decided to invest some time on the issue... and I think I have an answer to it, restarting XCode 4 or swapping between versions of XCode 4 didn't helped it.
I was getting the warning dialog with two different iPhones, both iPhone 4, running iOS 5.0.1 (Build 9A405). Then, I tested with an iPad 2 running iOS 5.0.1 (Build 9A405) and the dialog did stopped popping out, so I restarted the iPhone 4s and the problem is not happening anymore, I can build and run smoothly again.
Just as I suspected, the issue must be some background process listening on the device that XCode 4 needs to talk with. This process dies at some point during development or during normal usage of the phone and does not restarts by itself, you need to turn off the device and turn it on again.