As i am trying to run my application from newly updated Xcode 8 to my iPhone 4 which is running iOS 7.1.2
It throws below error,
Actually, there is a way. You just need to copy DeviceSupport folder for iOS 7.1 from Older Xcode to the new one. It's located in:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/7.1
If you don't have the 7.1 files anymore, you can download a previous version of XCode on https://developer.apple.com/download/more/, extract it, and then copy these files to following path
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/
Credit
Having the same exact issue with iOS 10.3 and Xcode 8.2.1. I'm not going to download the new Xcode beta just to fix this. Come on Apple!
To anyone reading this, you have to go to https://developer.apple.com/download/ and get the latest version, which might even be the beta, if the stable release doesn't work.
In the future, I would be aware if you update iOS on your devices you may break Xcode/iOS version so update wisely if you want to keep testing on it without jumping through hoops that Apple makes.
Download & mount http://adcdownload.apple.com/Developer_Tools/Xcode_7.3.1/Xcode_7.3.1.dmg
I was first wandered if it could be mounted directly through hdiutil attach
and looks like it could but not for everyone's accounts.
Open to see its content and copy Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/7.1
to same path into Xcode application directory.
Get latest iOS-device-support-files (GitHub) (updated regularly). Download and copy iOS-device-support-files to:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
You need device support from previous version of Xcode (7.3.1).
I would recommend to use this tool: https://github.com/KrauseFx/xcode-install
When you install Xcode 7, you should link support files to Xcode 8:
sudo ln -s /Applications/Xcode-7.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/7.* \
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/
If you have XCode 8.1 and iOS 10.2, update XCode manually to 8.2.1. For some reason App Store didn't offer this update.