Unable to build WebDriverAgentRunner app on iPhone 14 Pro Max device

Appium Server GUI mac - 1.22.3-4 Xcode (Version 14.0.1)  macMini (M1, 2020), macOS Monterey ( version 12.6) iPhone14 Pro max : iOS version 16.0.2

I am working on setting up Appium Automation scripts using Xcode on iPhone.At the time of building WebDriverAgentRunner app from Xcode to iPhone I am getting the following error:

"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 Test target WebDriverAgentRunner encountered an error (The bundle identifier for WebDriverAgentRunner-Runner.app couldn’t be read. The application may be damaged or incomplete: “/Users/paraggulwani/Library/Developer/Xcode/DerivedData/WebDriverAgent-fxmsedpwfaalxlbcwefbceeuodem/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app”.) "

Unable to build WebDriverAgentRunner app on iPhone 14 Pro Max device
 
 
Q