I make Cutling , an app that keeps the text you type again and again (your address, bank details, an email signature, the reply you send every week) and pastes it with one tap. On iPhone and iPad it's a keyboard you switch to in any app; on the Mac it sits in the menu bar and Shift-Command-V opens a picker at your cursor. The code is open source under GPL-3.0 ( GitHub ). Here's how the two halves work, and the platform corners I ran into.
On iPhone: a keyboard extension that inserts text
A custom keyboard gets a textDocumentProxy , and inserting a snippet is one call: proxy.insertText(value) . Images are different, because a keyboard can't insert an image into a text field. Cutling puts the image on UIPasteboard.general with its real type (it reads the type from the data with CGImageSourceGetType , so a GIF stays a GIF) and you paste it.
That pasteboard write is why the keyboard asks for Full Access ( RequestsOpenAccess in its Info.plist).…