From 33987faa9b08b3fd777b055ea98bdcce37acf917 Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Tue, 7 Jul 2026 17:31:27 +0800 Subject: [PATCH] =?UTF-8?q?chore(scripts):=20local=5Ftest.sh=20=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E9=94=81=E5=B1=8F=20iPhone=20=E7=9A=84=20xcodebuild?= =?UTF-8?q?=20=E6=8F=A1=E6=89=8B=E5=99=AA=E9=9F=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DTDK passcode protected 每 3s 刷屏(构建 generic/platform=iOS 不需真机), stderr 定向过滤堆栈噪音,真错误仍透传。 Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01JJ1g8XV1YhhmHRzhwWEW7o --- scripts/local_test.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/local_test.sh b/scripts/local_test.sh index fc85eff..d6c693e 100755 --- a/scripts/local_test.sh +++ b/scripts/local_test.sh @@ -46,11 +46,14 @@ if [ "${1:-}" = "--ios" ]; then echo "!! 未检测到已配对 iPhone(插线并解锁后重试)" >&2 exit 1 fi + # stderr 滤掉锁屏 iPhone 的握手噪音(DTDK "passcode protected" 每 3s 刷一条, + # 构建目标是 generic/platform=iOS 不需要真机,纯噪音;真错误仍透传) xcodebuild -workspace Runner.xcworkspace -scheme Runner -configuration Release \ -destination "generic/platform=iOS" \ CODE_SIGN_STYLE=Automatic DEVELOPMENT_TEAM=BYL4KQHMTN \ CODE_SIGN_IDENTITY="Apple Development" PROVISIONING_PROFILE_SPECIFIER= \ -allowProvisioningUpdates -allowProvisioningDeviceRegistration build \ + 2> >(grep -vE "DTDKRemoteDeviceConnection|DVTDeviceOperation|passcode protected|dtdevicekit|DTDeviceKitBase|DVTFoundation|libdispatch|libsystem_pthread|^\)|^\s+[0-9]+ " >&2) \ | grep -E "BUILD (SUCCEEDED|FAILED)" APP_PATH="$(find "$HOME/Library/Developer/Xcode/DerivedData" -path '*Release-iphoneos/Runner.app' -maxdepth 6 2>/dev/null | head -1)" if [ -z "$APP_PATH" ]; then