Could not receive a message from the device (iPhone) - iphone

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.

Related

IPhone connection to Xcode/Mac fails or is flapping

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.

Xcode Device Issue - Failed _shouldMakeReadyForDevelopment check even though device is not locked by passcode

Error and warnigs in devices and simulators
Issue :
Details
Failed _shouldMakeReadyForDevelopment check even though device is not locked by passcode.
Domain: com.apple.platform.iphoneos
Code: 5
Failure Reason: allowsSecureServices: 1. isConnected: 0. Platform: <DVTPlatform:0x7fecb76471f0:'com.apple.platform.iphoneos':<DVTFilePath:0x7fecb7647170:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform'>>. DTDKDeviceIdentifierIsIDID: 0
User Info: {
DVTDeviceDescription = "\Ud83d\Udcf1<DVTiOSDevice (0x7fecb9844570), TakHyun\Uc758 iPhone, iPhone, 13.4.1 (17E262), 8d695f88c5c910974df39462a1815a52376a0fa9>";
}
TRY:
Restart macbook and iphone
Trust in Trust This Computer notification
Xcode Version 11.4.1 (11E503a)
IPhone X ios 13.4.1
I finally figure it out
Connect the iphone(cable not wifi)
Unpair device and quit the xcode
Reconnect the iphone and Trust this computer accept
Done.
If you cant fix it, go to apple dev site
reedit the device and do it again 1~3
check this photos
I started getting the OP's error after updating my iPhone to iOS 13.5.1. Here is what worked for me to resolve the issue:
Unpair the iPhone (as per answer from #Jeff above).
Upgrade Xcode to latest, in my case 11.5 (which I believe is the first version of Xcode to support building to iOS 13.5.
NEW: I launched Xcode after updating to 13.5 which prompted me to "Install additional required components" which I did.
Xcode extra step after updating
Reconnect/pair iPhone in Xcode's Devices window and Trust the computer.
NEW: After pairing the iPhone make sure you check the "Connect via Network" checkbox for the newly paired iPhone. By default Connect via Network is unchecked.
Important step after re-pairing device
The "NEW" steps are not steps I've seen in previous answers, so I posted this answer.
Or Xcode is just not smart enough to know that your iPhone iOS version is newer than the one supported by Xcode! I had this issue, been trying all solutions until I updated my Xcode from 11.4 to 11.5
So this started for me after I updated Xcode to version 12, and my iPhone to iOS 14. The fix was as listed above (multiple times) to unpair, reconnect, and trust the computer, BUT only after changing the target to iOS 13 in Xcode did those steps actually work. Once it was reconnected I was able to switch the target back to iOS 14 inside Xcode. This one was frustrating.
In my case, I was using an USB to USB-C adapter which apparently my laptop did not appreciate. Switched to a usb-c lightning cable and poof - everything just works. Now I'm mad that I already reset my network settings!
I had issues with Xcode 11.5 and iOS 13.5.1
Sucessful:
Remove the Logitech Wireless Mouse USB Receiver that was plugged into
the USB-C to USB converter (I use this converter to connect both the
Wireless mouse AND my iPhone via USB to Lightning cable). This
REPRODUCABLY caused the described error "Failed
_shouldMakeReadyForDevelopment check even though device is not locked" to reappear when I repeated the re-pairing procedure with the
Logitech adaptor plugged in
Not successful:
Unpairing (from both Macbook or iOS - Settings - Developers - Unpair)
unplug, Repkug the USB Connector
Connect via Network setting
Restart iPhone, MacBook, ...
I had some success turning Bluetooth off and on again on the phone. Still, the watch often disappears.
None of the above worked for me. With iOS 14.0.1 and XCode 12.0.1.
I suspected it is an Apple bug with wireless communication to-from the device.
Since my iPhone can be used as a hot spot for my Mac, I found that once I used my iPhone as a hotspot from my Mac, XCode was able to upload the App binary to my iPhone and debug.
So I'd say if nothing else works then try to use your iPhone as a hotspot for your Mac, and then you should be able to wirelessly debug.
For me it was the exaxt opposite of the message. Xcode was up to date, but the iphone I was trying to run on was not updated to the latest version of iOS. 13.7 was the version at this time.
After updating to 13.7 the iPhone, everything went back to normal.
I rebooted my iPad, and it eventually worked...
My problem was building the application with a production provisioning profile.
in my case, the solution was to switch to the development provisioning profile.
Then it worked :)
Mine got resolved when I updated the Xcode from 12.2 to 12.3 Beta.
My iPadOS version is 14.2.
Even though XCode 12.2 supports OS 14.2, I faced the same issue. It is the XCode bug.

Virtual Mac XCode iPhone debugging - device not connected issue

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.

Xcode error: This device is no longer connected

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.

Application Loader (Apple) stuck on "Sending API usage to iTunes Connect"

I am submitting an iOS app to the App Store using Application Loader, however, it never gets past the "Sending API usage to iTunes Connect" stage. There is no error - this stage just doesn't complete.
I have verified that the Mac is connecting to the internet (I can visit websites). Also, the app is tiny (6MB) so this can't conceivably just be a long upload. I've tried leaving this for 20 minutes.
The background to this is that I developed in Flash CS5 on a Windows PC, built it for distribution there, and now on the Mac I am loading the final file into Application Loader to submit it. It verifies/validates the file just fine, but won't go beyond this point.
Any ideas anyone? Perhaps it's a network issue?
I had this problem when behind a firewall.
I got around it by going to Xcode > Contents > Applications > Application Loader > Contents > MacOS > itms > java > lib - Open net.properties with TextEdit and change the line
# https.proxyPort=443
to https.proxyPort=80. This enables the application to use the HTTP port for HTTPS. Worked straight away after this. Hope this helps.
You can solve this with a different approach using your iPhone. Disconnect ethernet internet cable connection (if you have one) and/or switch off wifi connection on your mac. Switch off your iPhone's wifi connection so G3 or G4 is active and turn on personal hotspot. Connect your iPhone with a usb cable with your computer and check in System Preferences -> Network if you're connected to internet via usb with iPhone. Start delivering your app with Application Loader program on your computer via your iPhone's internet connection. And yes you will cross the “Sending API usage to iTunes Connect” barrier and you will be able to upload the package to the iPhone store. At least I was!
If your Mac is has both a WiFi and an Ethernet connection, try turning off WiFi. That solved the problem for me (this time anyway).
I solved only rebooting mac.
I'm still searching for a less drastic solution!
I had my DNS set up to Google DNS. I removed the DNS settings and it worked for me.
Turning off iphone's wifi worked for me
Are you using Xcode Organiser > Upload to App Store or Application Loader?
I found I had the same issue when going though Xcode Organiser so tried it from the Application Loader (found within Xcodes application files) and it worked just fine. If that doesn't work there is a detailed activity log you can check to get a more detailed error.
Other things to try
- check your firewall settings, maybe temporary disable them.
- use an alternative connection, another wifi hotspot if you are on a MacBook, if not do what Oliver said and use your iPhone's cellular data.
I was connected to a VPN, disconnected and problem was solved.