I was getting an error of Failed to connect to XCAutomation due to I have the latest software version iOS 14.3 in the mobile (iPhone XR) & I am using the old version of Appium Studio 20.6.7047. I have upgraded to the latest software and the problem resolved.
Reference Link: https://appium.experitest.com/t/failed-to-connect-xcautomation-after-upgrading-to-ios-14-1/2130/4
Download links for appium Studio:
For Mac: https://go.experitest.com/appium-studio-download-mac-thank-you-page
For Windows: https://go.experitest.com/appium-studio-for-windows
CLICK HERE to find out more related problems solutions.