The hardware clipboard test's device-to-Mac check passes with DeviceHub sync on

未关闭 适合新手
#2,080 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
64/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
ios, typescript
领域
mobile, testing

调研方向

从 e2e/helpers/clipboard.ts:28 中的 expectClipboardIsolated 开始,检查设备到 Mac 的步骤如何写入和读取剪贴板。通过让 DeviceHub 与模拟器同步来复现,然后验证剪贴板同步时检查会失败、未同步时检查会通过;issue 指出,在模拟器内部复制仍未经过测试。

由索引模型根据 Issue 内容生成。

描述

bug:new
What happened

expectClipboardIsolated (e2e/helpers/clipboard.ts:28) checks the device-to-Mac direction by writing the simulator's pasteboard with xcrun simctl pbcopy <udid> and reading the Mac's 3 s later. With DeviceHub syncing that simulator, text written this way never reached the Mac, so the check passes whether sync is on or off.

Xcode 27.2 (27B52), macOS 27.0.1, DeviceHub running, simulator selected, no pasteboardSyncEnabled entry
host->device  SYNCED (1 s)
device->host  not synced after 8 s, mac still holds the host text
What you expected

The device-to-Mac half fails when DeviceHub syncs the simulator's clipboard to the Mac.

How to reproduce
  1. Boot a simulator in Xcode's device set, open DeviceHub, select the simulator.
  2. printf host-1 | pbcopy, then xcrun simctl pbpaste <udid> prints host-1 within 2 s.
  3. printf device-1 | xcrun simctl pbcopy <udid>, wait 8 s, pbpaste still prints host-1.
Environment

Xcode 27.2 (27B52), macOS 27.0.1, iOS 27.2 simulator (iPhone 16).

Logs and evidence

Found while checking #2073. Not checked: whether a copy made inside the simulator (not through simctl pbcopy) reaches the Mac.

Written by an agent.

主要语言
TypeScript
星标
730
派生
44
平均合并
15 小时 28 分钟
30 天内合并 PR
387

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

callstackincubator/simlock 的其他 Issue

查看 callstackincubator/simlock 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。