feat(app): keep the clipboard in step with the device - #61
Merged
Merged
Conversation
The automatic direction carries the Mac's copies to the device. The device's copies only come back when asked for, so the connection also reconciles the two sides, keeping whichever is newer rather than letting a pull overwrite a copy the user just made on the Mac.
One connection per open device, kept while the window is up, since the automatic syncing runs on it. The sync is on by default and remembered. Only the Mac to device direction is automatic, so the device's clipboard is fetched when the app stops being frontmost, which is when a copy made inside a device is about to be pasted elsewhere. Get and Send Pasteboard are the manual halves and are greyed while the sync is on, as in Simulator.app.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What: The Mac's clipboard and a booted device's now stay in step. Copies made on the Mac reach the device on their own, a copy made inside a device is on the Mac by the time you switch to another app, and Edit gains Automatically Sync Pasteboard with Get and Send Pasteboard as its manual halves. The sync is on by default and remembered between launches.
It runs on
SimPasteboardPlus, reached through the mach port the device vends for the service its own listener class names. Only the Mac to device direction is automatic, which is why the device's clipboard is fetched when the app stops being frontmost rather than left to arrive by itself.