I got the solution for this:
I was not building the webDriverAgent project provided by Appium Desktop. So Just go till the Appium Desktop location installed on your machine and find the WebDriverAgent project under that and build that project in Xcode with developer certificate.