Download device support files from here -https://github.com/iGhibli/iOS-DeviceSupport/blob/master/DeviceSupport/12.2%20(16E226).zip,
if your Xcode version doesn’t have them.
Extract the zip file and copy to
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport.
Rename 16E266 folder to 16E227.
Restart XCode.
As pointed out by @DavidH, this worked for me.