I have very frequent issues with connecting my IPhone to the Mac and getting recognized by Xcode. Either the IPhone is not recognized at all on Mac or Xcode sees the device 2 sec then doesn't see it anymore and flapping this way endlessly. What I do to fix the issue is rebooting Iphone, closing and restarting Mac and disconnecting the IPhone and resetting the USB port with command -> sudo pkill usbmuxd. Sometimes it works but not always in this case I reboot the Mac as well and this process I do it every 3rd time I connect my Iphone. All versions are up to date: Mac, Xcode, Iphone. Do you have the same issues and idea to fix it. By the way I also bought a brand new USB cable but still the same problem.
Related
Please bear with the question (I know there are many repeats but I am sure this is unique) and read this first before you think of downvoting due to duplicity:
This is pertaining to iPhone connected to my local desktop and XCode running on remote VM
The USB gate software is connecting my iPhone to the VM
It's not that XCode fails to detect it altogether.
It's an iPhone 3GS running iOS 5.1. XCode version is 4.6.
Now the issue:
I have the iPhone UDID added to my Apple developer Profile.
I can very well detect the iphone connected into XCode once I do all the necessary sharing for the USB Gate software. I see the yellow light.
It shows yellow light, shows some of the apps installed while some process is running in background. It shows the UDID and usual stuff.
After few moments though, XCode displays the message Device not connected.
I have already added support for armv6 inside my app, so that possibility is ruled out.
What to do?
PS: for the first time it launched iTunes after detection. However then onwards I disabled auto-syncing from iTunes. And now iTunes doesn't detect it even if I launch it explicitly. XCode does detect it, but after some time disconnects it automatically.
I successfully connected to remote VM installing Logmein's Hamachi VPN software on both my host and VM. Using it, XCode could detect my iPhone device once shared via USB Network Gate.
While executing the project on an iPhone, I am getting an error while installing the project through Xcode:
This device is no longer connected.
Whereas I can see the device summary and a green dot if I open the Xcode organiser. What is the problem?
Try quitting Xcode totally and reopening it.
I faced the same situation. I tried
Clean and build
Restarted Xcode
Deleted derived data
Rebooted system
nothing worked for me
I switched the usb port(from left to right port), It just worked.
I know it sounds weird, but it worked for me
The answer is to restart your iPhone and Mac. By doing this your issue will be resolved. This you can try on any version of Xcode
The error comes only after trying to run the project many items, instead of solving the Provisioning Profile issues.
So, it's better to solve the basic error first, or else it will create another hectic problem.
Try to disconnect the device and reconnect it. Sometimes this fixes such kind of problems.
If that does not work, closing and reopening Xcode may help.
Although, since you are mentioning a virtual machine, you might check and see whether there are any conflicts in the attribution of the USB port to one system or another (Windows vs. MacOS).
iPhone/iPad USB connectivity is finicky as it is, and you're running OS X in an unsupported way. I'd suspect that this is the problem.
If you're running VMware, this may help: DEBUGGING ON THE IPHONE & IPAD WITH VMWARE
Basically it's this: Install iTunes on both your host and client OS, as the Apple Mobile Device USB driver for Windows may help your cause.
However, if you're serious about developing for iOS, using a "real" Mac is definitely the easier way.
UPDATE: From your comments, I gather that you need to be able to use Accelerometer input in your app. You could use iSimulate (in the App Store) to send this data from your device to the iOS Simulator.
I got this issue after installing Xcode 5. The solution I found is to restart your system and it works fine.
I had the same problem. It was a broken cable.
Since upgrading to Xcode 4.2 I've regularly encountered an error where attempting to debug an app fails with the message "Unknown packet reply: "timeout" to environment packet." Restarting the device does not consistently solve the problem (though it sometimes does), nor does restarting Xcode or rebooting the development machine. Cleaning and recompiling also does not fix the problem.
It's not limited to the project; once it happens I can no longer launch any apps through Xcode.
The device is an iPad running iOS 4.3.5; the development machine is a Macbook running Lion.
Haven't see similar reports. I would suspect the usb cable at this point.
I still have no idea what was causing this before, but I haven't seen it since upgrading to Mountain Lion and Xcode 4.4.1 so I'm answering the question to mark it closed.
Background: As I'm developing an app that needs to be run on a device, I often get weird errors with Xcode. They are really annoying and to get the builds to run on the device , its almost like I have to do an offering to Xcode to get it to work. Normally, I would just reboot the device, reboot the mac, clean all targets, disconnect device, reposition USB cable, and turn the device off. But the development device I'm using has a broken sleep button. I can't turn it off.
What do I do?
Here are the errors I've faced
Broken Pipes
The Service is Invalid Please check your setup and try again.
(0xE8000022).
and the most annoying one, after the Build Works, I get this in the console and no other message. The first line is fine, but then the next line seems to be the issue.
This GDB was configured as "--host=x86_64-apple-darwin --target=arm-apple-darwin".tty /dev/ttys001
target remote-mobile (null)
warning: Couldn't connect to unix service: "(null)", error: "No such file or directory".
Settings>General>Reset and then choose one (network settings apparently causes a reboot, but content and settings definitely will if you don't mind) will allow you to reboot the device. You can also wait for the battery to run down, restore via iTunes or jailbreak and run reboot, but you obviously shouldn't test on a jailbroken device.
I built and run an iPhone application on iPod Touch 2.2.1 device, got some problems and made a fix attempt. Now trying to re-build & run the application gives two (2) error popup notes:
Could not receive a message from the device [OK]
Google couldn't find this! The device itself is working happily, I can even launch and use the app I'm trying to install. iTunes looks like it's still connected... What could be the problem?
Restart the iPhone.
Restart your iPhone device. Also, restart Xcode. This worked for me.
Are you using some "cheap" USB cable? This was the cause in my case.
Just got the same message. I fixed it by connecting my iPhone directly to my Macs USB-Port instead of connecting it to a USB-Hub.
I was having the same issue, and it was due to having old WiFi connection settings. I just connect new WiFi in both iMac and iPhone. I never connect via USB. iMac automatically connects to my iPhone and I can debug directly on my iPhone. Sometimes the connection is loose; in that case, I just go to
-> Windows -> Device and simulators -> select my device -> right click -> connect vai IP address.
Just enter an IP address from my iPhone WiFi. For that, just go to --> WiFi of iPhone -> info (symbol) -> IP address.
I also got this messsage, the problem was too many devices (via USB) connected to my MacBook Pro.
Received this message recently and tried the steps above, specifically different combinations of restarting the iPhone, disconnecting/reconnecting it, and quitting/restarting Xcode.
In the end, I restarted my comp and it works fine now.