Error Cannot link directly with dylib/framework
Cannot link directly with dylib/framework, your binary is not an allowed client of /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/XCTAutomationSupport.framework/XCTAutomationSupport for architecture arm64
For both the WebDriverAgentLib and WebDriverAgentRunner targets make sure that "Automatically manage signing" is checked in & your Development Team selected in "Team" Dropdown.
For both the WebDriverAgentLib and WebDriverAgentRunner targets add arm64 in the Excluded Architectures of the build settings by clicking on + symbol(XCode version 14)