9 C
New York
Friday, October 18, 2024

macos – The way 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 choosing 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 attempting to resolve this drawback the subsequent greatest manner 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 exhibits 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 digital camera, the one choice is to “Seek for the textual content “. I want to copy/paste the textual content as a substitute, and never share the textual content with Google or no matter different search engine.

Possibly I can get Safari to indicate 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 certain 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 whats upnthere | 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 exhibits 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 will be cool in the event you can clear up the QR code route that I could not, however I might even be comfortable to see one other answer if it is as handy as I imagined the QR one can be (I used to be going to make it a Fast Motion so it might present within the Companies menu on the Mac).

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles