Skip to content

Conversation

@matthew-carroll
Copy link
Contributor

[Super Clipboard][iOS] - Swizzle Flutter method to say that we can paste even when binary data is on the clipboard

We recently implemented image pasting by swizzling Flutter's iOS framework paste method. This successfully let us paste images.

However, Flutter also has a method that answers the question "is there anything to paste?". On the iOS simulator this answers "yes" when pasting images. But on physical iOS devices, this answers "no" when pasting images. The supposed difference is that the simulator saves the image's file path to the clipboard, making it look like string text is available. But on a physical device, only the binary data is saved, so Flutter can't find any strings on the clipboard, and reports "no".

We need to swizzle this additional behavior to say "yes" when there is binary data to paste.

…ste even when binary data is on the clipboard
@matthew-carroll matthew-carroll merged commit 572132d into main Jan 27, 2026
25 checks passed
@matthew-carroll matthew-carroll deleted the 2902_super-clipboard-swizzle-can-paste-flutter-delegate-method branch January 27, 2026 01:49
github-actions bot pushed a commit that referenced this pull request Jan 27, 2026
Copy link
Collaborator

@angelosilvestre angelosilvestre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants