Xcode iPhone Developer mode disabled

Error: Unable to deploy app on iPhone when connected to Xcode. Getting error “Developer mode disabled”.

Solution: The solution is to go to following setting on iPhone:

Settings >> Privacy & Securtity >> Developer Mode

and turn Developer Mode on. Restart the device. After restrting the iPhone the XCode will be able to connect to your iPhone.