macos – Learn how to switch plain textual content from Mac to iPhone?


I wish to ship plain textual content from my MacBook to iPhones.

I can not get AirDrop to work; I’ve tried deciding on the textual content, right-clicking it, and clicking “Share” however AirDrop does not present up within the sharing menu.

enter image description here

enter image description here

So I’m making an attempt to resolve this drawback the subsequent greatest means I may consider: making a QR code pop up on the Mac that the telephone can scan.

I’ve written a brief script that makes that generates and reveals a QR code for textual content handed to stdin:

#!/bin/zsh

workdir=$(mktemp -d)
cd "$workdir"
/usr/native/bin/qrencode -s 10 -o qr.png
qlmanage -p qr.png

(utilizing brew set up qrencode to make the QR code)

This makes an accurate QR code for the textual content, however when the iPhone scans it with the default digicam, the one choice is to “Seek for the textual content “. I wish to copy/paste the textual content as an alternative, and never share the textual content with Google or no matter different search engine.

Possibly I can get Safari to point out the textual content whether it is data-URI encoded?

#!/bin/zsh

workdir=$(mktemp -d)
cd "$workdir"
perl -MURI::Escape -e 'native $/; print(uri_escape(<>));' |
sed 's_^_data:textual content/plain;charset=ISO-8859-1,_' |
/usr/native/bin/qrencode -s 10 -o qr.png
qlmanage -p qr.png

however no luck, now the iPhone says “No usable information discovered” when it scans the QR code.

I am fairly positive the information URI is appropriately encoded, Safari on my Mac and on my iPhone (after I manually enter them) can open all of them, for instance

% echo good daynthere | perl -MURI::Escape -e 'native $/; print(uri_escape(<>));' | sed 's_^_data:textual content/plain;charset=ISO-8859-1,_'
information:textual content/plain;charset=ISO-8859-1,hellopercent0Atherepercent0A

and information:textual content/plain;charset=ISO-8859-1,hellopercent0Atherepercent0A reveals the inputted textual content whenever you put it into the URL bar in macOS Safari and in iOS Safari.


So my query is, how can I truly most simply transport plain textual content from macOS to an iOS clipboard? Not the identical iCloud/Apple account on each units.

It could be cool if you happen to can remedy the QR code route that I could not, however I might even be glad to see one other answer if it is as handy as I imagined the QR one could be (I used to be going to make it a Fast Motion so it could present within the Providers menu on the Mac).

Recent Articles

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here