Appium iOS issue with automaitionName capability

Configuration: Xcode: 9+
caps.platformName =“iOS”;
caps.deviceName = “iPhone7”; = “com.xxxx.xxxx-xxxx”;
caps.url = new URL(“http://localhost:4723/wd/hub”);
I have set the above capabilities , but it is throwing error -
org.openqa.selenium.SessionNotCreatedException: A new session could not be created. Details: Appium’s IosDriver does not support xcode version 9.3. Apple has deprecated UIAutomation. Use the “XCUITest” automationName capability instead. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 633 milliseconds

I did the same capabilities in Appium inspector and it is working fine there, but showing error while executing with program.
Please help with the solution.

Appium version should be 1.7

Check this thread also Appium 1.8.0 version should work for this issue.

This issue is resolved. Thanks for the help