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.