This iPhone 6 is running iOS 12.4.1 (16G102), which may not be supported by this version of Xcode

Issue: This iPhone 6 is running iOS 12.4.1 (16G102), which may not be supported by this version of Xcode.

Resolution:

a). If the issue is not replicated on your another device with latest Xcode version

We need to add the support files in the Xcode. The files can be found on a system with latest Xcode on the path -

  1. Go to Applications.
  2. Right click on Xcode, click on "Show Package Contents".
  3. Go to Contents -> Developer -> Platforms -> iPhoneOS.platforms -> DeviceSupport
  4. Copy support files for the iPhone version.

Paste the file into the system in which you are facing the issue in same path as of above. Close the Xcode and run the code again to refresh the files.

b). If you don't have a system with latest Xcode.

Download the file "iOS 12.4 Developer Disk Image" from the https://github.com/xushuduo/Xcode-iOS-Developer-Disk-Image/releases and unzip the file. Rename the folder to "12.4.1 (16G102)" and paste the file into the system in which you are facing the issue in below path:

  1. Go to Applications.
  2. Right click on Xcode, click on "Show Package Contents".
  3. Go to Contents -> Developer -> Platforms -> iPhoneOS.platforms -> DeviceSupport

Close the Xcode and run the code again to refresh the files.