Leased iOS simulators share the Mac clipboard through Xcode 27's DeviceHub

Đang mở
#1,433 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
54/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
ios, typescript

Hướng nghiên cứu

Start by reading the iOS lease grant and device deletion paths in simlock, then inspect the lease wrapper described in the issue and WebKit’s Tools/Scripts/webkitpy/xcode/simulated_device.py for prior art. Check how simlock boots and removes leased devices before deciding where to apply and clear the per-device preference. Done means the clipboard sync setting is applied for each lease and its DeviceHub entry is removed when the device is deleted.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

What happens. On Xcode 27.2 (27B52), DeviceHub (com.apple.dt.Devices) syncs the Mac pasteboard with every booted simulator by default. Two agents holding separate simlock leases therefore share one clipboard. In our parallel UI gate, a link one lane's test copied reached another lane's app and replaced a search field with a paste prompt, failing an unrelated test. Test runs also overwrite the user's Mac clipboard.

The old com.apple.iphonesimulator PasteboardAutomaticSync default has no effect under DeviceHub.

Per-device switch that works. DeviceHub reads a per-device preference:

defaults write ~/Library/Containers/com.apple.dt.Devices/Data/Library/Preferences/com.apple.dt.Devices.plist \
  DevicePreferences -dict-add <UDID> '<dict><key>pasteboardSyncEnabled</key><false/></dict>'

DeviceHub reads it when the device boots or when its name changes. For a device that is already booted, renaming it and restoring the name about 0.8 s later applies the setting.

Proof on a leased device. After the write and the rename refresh, a marker string copied on the Mac did not appear in the leased simulator's pasteboard. Before the change it did. We did not re-test the device-to-Mac direction.

Prior art. WebKit passes the same per-device dictionary as a launch argument (WebKit PR 78474, Tools/Scripts/webkitpy/xcode/simulated_device.py). appium/appium-ios PR 26 uses the rename refresh.

Request. Could simlock apply this switch when it grants an iOS lease, ideally before boot so no refresh is needed, and remove the device's DevicePreferences entry when it deletes the device? Today we do it in a lease wrapper, and stale per-UDID entries pile up in DeviceHub's plist because the wrapper never sees the device deleted.

Ngôn ngữ chính
TypeScript
Star
535
Fork
21
Merge trung bình
8 giờ 58 phút
Pull request đã merge (30 ngày)
472

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của callstackincubator/simlock

Tất cả issue của callstackincubator/simlock

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.