完整提示:
/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent/PrivateHeaders/XCTest/XCTestCase.h:54:42: Parameter of overriding method should be annotated with __attribute__((noescape))
解决方法:
1.将Xcode15的Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/目录下的PrivateFrameworks文件夹替换成Xcode14的,然后将PrivateFrameworks目录下的XCTAutomationSupport.framework文件夹替换成Xcode13的,不然会提示“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”
2.下载appium-webdriveragent版本5.6.0(npm i appium-webdriveragent@5.6.0)
将appium-webdriveragent目录下的build文件夹替换成appium安装路径下的build文件夹(
/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent/build),然后用Xcode15打开appium-webdriveragent/WebDriverAgent.xcodeproj
文件修改对应的签名信息进行build即可。