Unable to launch webdriveragent because of xcodebuild failure / cannot link directly with dylib/framework

Unable to launch webdriveragent because of xcodebuild failure: xcodebuild failed with code 65 xcodebuild error message

cannot link directly with dylib/framework

Please refer the below link for the solution. it worked for me.