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

Aperta
#1,433 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
54/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
ios, typescript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
535
Fork
21
Merge medio
8h 58m
PR unite (30g)
472

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di callstackincubator/simlock

Tutte le issue di callstackincubator/simlock

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.