Author's Posts

In an effort to support macOS Monterey’s new Shortcuts in Transloader‘s Link– and File Actions, I decided to run all the necessary CLI commands and AppleScripts in an external XPC service, mostly to separate privileges (running Apple Scripts (which aren’t precompiled and reside in the Application Scripts folder) in a sandboxed Mac app requires specific sandbox entitlements, which Transloader itself just doesn’t need).

I didn’t start with an XPC service, though. For testing and debugging purposes, I began with a new app in Xcode and ran all the Apple Scripts from there, which, after a bit of tweaking because I’m not “fluent” in Apple Script, worked just fine.

After subsequently moving them into an XPC service and thinking it would “just work”, I found that it didn’t. At least not reliably. Maybe every 8th or 9th time, yes, it did all it was asked to do, but every other time, it outright refused to execute Apple Scripts.

After two days of desperate attempts to get it working correctly, and almost giving up on the XPC privilege separation entirely for this, I figured I’d check to see if the Apple Scripts were being executed on the main thread.
I did recall reading quite some time ago (I don’t know where, sorry) that Apple Scripts on background threads are iffy in their execution. Lo and behold, the methods weren’t run on the main thread. One quick dispatch_async to the main queue later, and everything worked as I expected it to.

So, the takeaway of all this, and the TLDR, is this post’s title: An XPC service’s methods aren’t necessarily run on the main thread. Go figure.

Addendum

If you’re wondering what my configuration for the XPC service is:

RunLoop = NSRunLoop
ServiceType = Application

I did try dispatch_main as RunLoop as well, which worked too, but I just figured, for Apple Scripts, NSRunLoop would be required, but I don’t know for sure.

Read more

Yoink for iPad and iPhone v2.3.5 introduced Background Clipboard Monitoring, which, if enabled, stores anything you copy, even if Yoink itself is in the background, effectively giving you a clipboard history.

With version 2.4, I’ve improved it by adding the ability to only monitor for specific data types, and to temporarily pause the monitor.

Background Clipboard Monitoring in Action on iOS 15 and iPadOS 15
Captured on my iPad using iPadOS 15, lightly edited for brevity but otherwise unaltered

For demonstrative purposes, I kept Yoink in the foreground as a Slide-Over app, just to show what gets added when.
But all of this works even if Yoink is not visible on your display and put in the background.

In the video above, I enable Yoink’s clipboard monitor and consecutively copy an image, a link, and some text; all get stored in Yoink.
I then use the Picture-in-Picture’s fast forward button to tell Yoink to only watch for text. With that option set, I again copy an image, a link, and some text; this time only the text is stored in Yoink.
I click the fast forward button again to make Yoink only save links, and repeat the copy-procedure of an image, a link, and some text; now, only the link gets stored in Yoink.
A final time I click the fast forward button to have Yoink only watch for images and – you guessed it – when I copy an image, a link and some text, only the image is added to Yoink.

Next, I pause the clipboard monitor by using Picture-in-Picture’s Pause button. Now, Yoink does not react to any copy events at all. By pressing the Play button in PiP, I reactivate the clipboard monitor.

Notes on the monitor’s behavior

The clipboard monitor attempts to ignore sensitive data, like passwords. For this, it refers to the pasteboard data types proposed at nspasteboard.org, and checks if there are any password-type app names contained in the pasteboard data types, like “1password”, or “keychain”, for example. If encountered, Yoink ignores the copy-event and waits for the next.

As for energy consumption, it is very light-weight.
The images you see in Picture-in-Picture are static – it doesn’t play video, it doesn’t play audio.
Yes, Yoink will continue running in the background because of this, but all it does is check your pasteboard every couple of seconds (and not even the data directly, only a “changeCount” value provided by the API).
If a change has occurred, it will save the content to Yoink and to disk.
Syncing – if enabled – only occurs when the app comes back to the foreground, so there is no added network activity.

Other Changes in Yoink v2.4

– I improved Yoink’s compatibility with GarageBand. Dragging an audio file to GarageBand from Yoink now works correctly
– Picture-in-Picture for arbitrary content now properly displays Map location items
– I fixed a memory leak and a couple of app crashes

Pricing and Availability

Yoink is available on the iOS App Store as a one-time purchase, for $5.99 / €5.99.
It is localized in English, German, Simplified Chinese, Japanese and Korean, with more languages to follow.

Links

Yoink for iPad and iPhone Website
Yoink on the iOS App Store
Yoink for iOS Usage Tips
Yoink for iOS Press Kit (.zip download)

Yoink is also available for Mac:
Yoink for Mac Website
Yoink on the Mac App Store
Yoink for Mac Usage Tips
Yoink for Mac Press Kit (.zip download)

I do hope you enjoy Yoink!
If you have any feedback or questions, don’t hesitate to mail me, I’d love to hear from you.

Stay healthy and safe!

Read more

After releasing Yoink v2.3, which brought the app up-to-speed on all things iOS 15, I have another great update out for Yoink for iPad and iPhone, which allows you to make the app monitor your clipboard in the background and save almost anything you copy or cut.

Background Clipboard Monitoring

In the video above, you can see it in action, running on my iPad.
Starting the Clipboard Monitor offers you three options:
1. a 5-minute timeout
2. a 30-minute timeout, or
3. no timeout at all.

So, were you to start clipboard monitoring with a 5-minute timeout, it would save anything you copy or cut, and automatically end after 5 minutes, if you didn’t copy or cut anything in that time.
Clipboard monitoring also ends as soon as you close the Picture-in-Picture overlay.

Of course, this also works on iPhone:

So in addition to sharing content to Yoink with its Share extension, manually pasting content into the app, and Siri Shortcuts, you can now have anything you copy stored automatically in Yoink.

Notes on the monitor’s behavior

Yoink attempts to *not* save sensitive data, like passwords. It does so by referring to the pasteboard data types proposed at nspasteboard.org. It also checks if there are any common password-type app names contained in the pasteboard data types, like “1password”, or “keychain”, for example. If that’s the case, Yoink ignores the copy/cut event and waits for the next.

Regarding energy consumption, it’s very light-weight.
The Picture-in-Picture content is just a static image that changes to another static image if a copy-event was detected. It doesn’t play video, it doesn’t play audio.
Yes, Yoink will continue running in the background because of this, but all it does is check your pasteboard every couple of seconds (and not even the data directly, only a “changeCount” value provided by the API).
If a change has occurred, it will save the content to Yoink and to disk.
Syncing only occurs when the app comes back to the foreground, if enabled, so there are no round-trips to iCloud every time you copy something.

Another (already released) cool new feature in Yoink for i(Pad)OS 15

Just because I think it’s awesome, I thought I’d mention another Picture-in-Picture feature Yoink has been offering since iOS 15 was released – displaying arbitrary content in PiP.
This means you can view photos, texts, PDFs, eMails, websites and more in the Picture-in-Picture overlay.
Check out this video of it, where I open a website in PiP and scroll through it using its controls.

Links

Yoink for iPad and iPhone Website
Yoink on the iOS App Store
Yoink for iOS Usage Tips
Yoink for iOS Press Kit (.zip download)

Yoink is also available for Mac:
Yoink for Mac Website
Yoink on the Mac App Store
Yoink for Mac Usage Tips
Yoink for Mac Press Kit (.zip download)

I hope you enjoy Yoink’s recent updates. If you have any feedback or questions, don’t hesitate to mail me, I’d love to hear it!

Stay healthy and safe!

Read more