Xcode does not recognize iphone

Xcode 9.4.1 on MacOS 10.13.6 does not recognize iphone (iOS 11.4.1), hence "No devices connected to 'My Mac'".

Even Window -> Devices and Simulators, there are no devices.

But the iphone device is recognized on USB device list.

Could you suggest how I can fix this problem or what I did wrong?


Also, I have noticed that the system report of MacOS says the version of the iOS on the USB is 7.0.2.

But the iOS version is iOS 11.4.1. Is this normal?


Thanks.

Post not yet marked as solved Up vote post of KatoBrain Down vote post of KatoBrain
11k views

Answers

Does iTunes see it?


Has it worked w/Xcode in the past?


Are you using an Apple branded USB cable, connected directly to your mac?


Seen this SO thread?

https://stackoverflow.com/questions/10087985/xcode-doesnt-see-my-ios-device-but-itunes-does

Post not yet marked as solved Up vote reply of KMT Down vote reply of KMT

Thank you very much for trying to help me.
> Does iTunes see it?
No.
> Has it worked w/Xcode in the past?


No. This is the first time for me.


> Are you using an Apple branded USB cable, connected directly to your mac?


Yes.


> Seen this SO thread?
Thanks. I will check it out.

I should also ask if you have a paid Developer Program account, or using Xcode's free provisioning? There are different procedures when using Xcode, depending on which example, so be careful when troubleshooting.

Post not yet marked as solved Up vote reply of KMT Down vote reply of KMT

This worked in my case. Xcode13.0 & macOS 11.6

Quit XCode
Disconnect device
In your terminal sudo launchctl stop com.apple.usbmuxd
Relaunch Xcode
Connect device