This is happening intermittently, but frequently iOS devices are connecting to my MacBook Pro (mid-2014) and then quickly disconnecting. Without any clear error or log to indicate why.
Where should I look for event logs that may help indicate what the underlying error is? I've tried to look through console logs for system events but I haven't seen anything that jumps out.
I've gone through many of the recommended solutions for Xcode not recognizing iOS devices:
Clean Project
Delete DerivedData folder
Restart Xcode
Restart the Mac
Restart the iPhone
Reset device permissions to re-trigger the "Trust Computer" prompt
Deleted iOS DeviceSupport folder
Alternated USB ports
Kill USB process
Deleted and re-installed the latest version of iTunes
Swapped out 4 different lightning cables
Tried 5+ different iOS devices with various versions of the OS
Went back to Xcode 8.2.1 to see if it was an issue with 8.3.1
Corporate IT reset my SMC this morning. I put in a request to have them disable Sentinel Agent to see if that's a factor, but it's not the clear culprit since other developers are still able to connect.
Very rarely, the connection will hold and I can use the device just fine. I have yet to determine what combination of astrological events leads to that case though.
Had the same issue and tried 10+ of the things you listed as well. Even tried uninstalling a few things that could have been interfering. As soon as I switched USB ports it worked and stayed connected. Turned out to be lint/dust in the USB port. A little duster in the port and it works like a charm. Sometimes the answer is so simple.
This is a disappointing solution, but IT reimaged my machine and the device connection has been stable ever since.
So if all else fails for you, start over.
Update:
This ultimately was narrowed down to an issue with Mobile Labs Device Bridge. Removing their launch daemons and restarting the system is the much simpler solve!
Related
I needed to run a long test to see what's making my app crash. So I set the Mac to not sleep and I ran the app on the iPhone connected via USB overnight. In the morning, I found that the iPhone had disconnected during the night.
I looked for in Console and Xcode for device logs and I found there were none at all on the phone, therefore no history of what happened during the night. Logs began after the moment I reconnected the phone to the Mac.
I downloaded the app container and found no useful evidence of what happened.
iOS is 12.4 and Xcode is 10.3.
What can be done to ensure there is some evidence of what caused the crash? Other than filling the app with fprintf's going to a custom log file. Also I am using Fabric.
Do the same thing again, but this time with a camera looking at the PC. Maybe you can grab some evidence from the recording next day. Modern solutions for modern problems.
Go to Settings -> Touch ID and Passcode
Check if USB Accessories has been turned off. Your device may have disconnected then failed to reconnect due to this feature restricting access to the device if it is disconnected for more than an hour.
Change this setting, replace your cable or use a different USB port then try running it again.
TL;DR: I can run our app in development mode through VS2015 with remote debugging on the iPhone 5c that I have, but I cannot do the same on the iPhone 4s.
I'm having some difficulty getting a Cordova powered hybrid app to deploy on one particular device in my development environment... However I'm unsure if this is something I'm doing wrong or if there's some compatibility issue here. Posting a question here in the hopes that someone can help me work out what's going on.
Just for some background: The app in question was created using Intel XDK, then ported across to Visual Studio 2015 when Intel recently removed some of XDK's "Debug" functionality. A few things needed to be adapted, but the project does still include some of Intel's JS code as it was in the original project.
My environment includes:
Windows 10 Pro (primary desktop)
Apple Mac Mini with OSX "El Capitan" 10.11.6 (on the network as a build server)
iPhone 5c with iOS 8.3
iPhone 4s with iOS 9.0.2
While configuring this environment, I followed the instructions here. The remotebuild agent is configured to use http only to keep it simple, since this is all contained within a corporate network anyway.
After this I could run our app on the iPhone 5c without any problems, but trying to run it on the iPhone 4s gives an error in VS2015 stating:
Failed to deploy iOS remote for <project_path>\bld\ios\Debug\buildInfo.json to http://10.66.7.23:3000/cordova:
Error from http get [object Object]: Error: socket hang up
Note: There are no errors in the remotebuild console output on the Mac and VS builds the project correctly, but then fails to deploy it.
I've also tried multiple Provisioning Profiles on both devices, installed using iTunes, Xcode or Apple Configurator 2; but thanks to the provisioning profiles not showing up on devices with iOS 8 or newer, I can't even verify that they're installed at all.
Both of these devices can install and run the previous version of this app (available in app stores), but I need to be able to inspect the DOM in real-time, because even though they have the same screen size, the responsive break points are behaving differently.
So, before I pull out what little hair I do have left, please could somebody help me work out what the hell is going on here?? I've been fighting with this for over a week now and I feel like I'm going round in circles.
After all this backwards and forwards with the iPhone 4s, it turns out the device itself was actually faulty. Somehow this had translated to having a version of iOS that was not installed correctly, which resulted in software issues for apps running on the device.
This was not immediately apparent to us because of the unfortunate lack of devices we had access to for testing, but since I managed to get my hands on an iPad Mini with 9.3.5 and an iPhone 6 with 10.2.1, we've managed to verify our app's compatibility with the newer OS versions.
Anyways, in closing I just wanted to say a massive thank you for all the suggestions and ideas I got in the question comments (especially #Gandhi, sorry about the bounty story, I still feel like you deserve that just for being so helpful).
Despite the fact that my particular issue was not something that could be resolved here on SO, I have still learned a great deal during this process and I am so very grateful.
Even the answer is already posted by the Questioner himself, I m still posting mine for the benefit of others.
When a build deploys fine on one device running on iOS 8 and not on the one running on iOS 9, it could either be problem with iOS version due to the security changes or it could be the device compatibility problem.
In such case, the quick way to narrow down the problem is to test the build on other device with the same version (iOS 9). But unfortunately in #Zalithka's case he dint had device to test. But if someone encounters such problem, try out in different devices to narrow down the problem quickly and nail it.
Once I've upgraded and installed Xcode 8, my developing experience with iOS has gone down the gutter. Most frustrating of all is the need to verify the app every time the app is installed from Xcode.
I'm working on simulating data loss so that I can build correct error handling solutions, but when I install the app from Xcode with my device's data connection to off (no wifi, no cellular), Xcode prompts me to verify the app by turning on data connection. This is the case even when I simulate network loss with the network simulator.
I never dealt with this issue in Xcode 7.
Due to this issue, I'm unable to set breakpoints, work step-by-step troubleshooting, and work with the console when I have no data connection.
Is there something that'll verify an app forever, once and for all? I'm not deleting the app from my iPhone 7 each time I install the app. I'm just pressing the play button from Xcode like I always used to.
Thanks for your help.
Today, my builds suddenly started taking a long time to install & launch on my iPad (using XCode 7). During the "Performing Install Actions" phase, it hangs for about a minute, and then when the launch screen shows on the device, it takes about another minute for the app to launch. After the app launches, it runs normally without any issues.
I've restarted Xcode, cleaned the app, deleted build folders, deleted DerivedData, restarted OSX, restarted iOS, deleted the app from my iPad, and even upgraded iOS on the iPad to 9.0.2.
Edit: This issue originally seemed to be specific to the iPad Mini 3 I was using; it didn't happen on the iPhones I'm testing with. Now, after the weekend, it's happening on an iOS 8.4 iPhone 5s that I'm also developing on.
Edit 2: This was happening sporadically yesterday and it now seems to have cleared itself up, on all my devices. Still no idea what steps to take to fix this if it happens, though.
Edit 3: It continues to happen, but much more rarely.
I've been dealing with this same thing, but connecting the phone to WiFi seems to unblock my installs. Who knows why... but give that a shot if you're still running into this issue.
I recently ran into this problem and resolved it by restarting the device. I have no idea of what the cause is so I am reticent to suggest this is a universal solution but it did work for me once in a row.
Fix : Turn off iPhone wifi. restart it and install the app now. Now you turn on the wifi. and it works. Fixed.
I had a similar problem, but for me the app wouldn't launch at all. This might have been happening because I was connected to a WiFi that didn't have internet access. Changing to a WiFi with internet access solved the problem for me. It started happening suddenly for me as well, so not sure what triggers it. I've now changed back to the WiFi without internet access, and it seems to work again.
I met this problem in Company, but not at home, when debugging on device.
So if you are working under a company WIFI, just Changing WiFi to Internet Access will solve the problem.
I had the same problem just now.
What does NOT work for me:
Restart Xcode
Clean the project
Unpair and reconnect the device
(Re)connect to wifi
What DOES work for me:
Restart the device and build again
Another possible cause is low disk space on your Mac. Make sure your mac has enough space - I was running with 13mB space remaining... This will impact cacheing etc. and will cause delays on your build.
I have this issue when my Apple Watch are on me. Maybe some problems with paired devices.
I'd like to understand why, and find a solution obviously. I can't figure it out, given the console disappears as soon as the device reboots and is then reset when it comes back from the reboot. So I don't have any clue of what's going on there.
iphone4, ios 5.0.1 installed, jailbroken when the latest redsnow & untethered JB. I tried in safe mode, same thing.
I noticed that everytime I connect the phone osx mounts a developerdiskimage volume while xcode is displaying "checking DDI symbols", and after that then the phone is considered valid for dev by xcode. After the phone just rebooted, it's shown as invalid for development in xcode, until I unplug / replug it. I don't think I ever noticed that before, could it be related?
With the new ios 5.1.1 jailbreak out. You might want to revisit it again. I had a similar problem where I could mesure leaks but trying to mesure CoreAnimation or anything else would restart the device.