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.
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.
Downie lets you easily download videos from thousands of different sites. Just copy-paste the link of a video you find on YouTube, or Vimeo – or any number of video hosting sites – to Downie, and it’ll download the video. It’s that easy.
Downie and Transloader
Use Transloader in combination with Downie, and you can download videos you come across on your iPhones and iPads on a Mac remotely. Set up a Link Action for YouTube links, and Transloader on Mac will forward those to Downie, which will download them right away.
Setting up a Link Action in Transloader
In Transloader’s preferences, select Actions and add a Link Action. Configure it to launch Downie for links that point to youtube.com:
Now, anytime you assign your Mac a YouTube link with Transloader, the Mac app will forward it to Downie for download:
To avoid Downie potentially asking for user input while you’re away, open its preferences, select Advanced and select Run in automated mode.
And that’s it!
You can get Downie here (a free trial is available).
Get Transloader for Mac, iPhone and iPad here (a free trial is available).
For more tips on getting the most out of Transloader, check out the Usage Tips page.
I’m so happy to finally be able to announce the immediate availability of Transloader v3.0 for Mac, iPhone and iPad. The app has been re-imagined, re-designed and re-developed from the ground up, with macOS Big Sur, iOS/iPadOS 14 and Apple Silicon in mind. It’s been such a long time since the app received its last meaningful update, but oh boy, this is a great one, if I may say so myself.
What is Transloader?
With Transloader running on your Macs, you can assign downloads to it from afar – using your iPhone, iPad, and other Macs.
Say you’re in a Café, surfing on your iPhone and find out Apple has just released a new beta of Xcode. Wouldn’t it be awesome if you could start downloading that huge xip file immediately on your Mac back home, and have it ready when you return? With Transloader, you can.
Send the link to your Mac, and it will start the download right away. When it’s done, it’ll also send you a push notification about it. You can start downloads on Macs from Transloader itself, directly from within your browser using its Share extension, and – on iOS – with Siri Shortcuts.
What’s New in Transloader v3.0?
– Support for multiple Macs You can now specify one or several Macs you’d like to download a link on.
– Start downloads from other Macs Where in previous versions you could start downloads only from your iOS devices, Transloader 3.0 lets you initiate downloads on Macs from other Macs as well.
– Login to download If a download requires a login on its website before you can access it (like the aforementioned Xcode beta), that’s no longer a problem for Transloader. You can login to sites you anticipate to download from beforehand, or later, at any time, from any device.
– Link- and File Actions on Mac Using Actions, you can modify Transloader’s behavior in different scenarios.
With a Link Action, you define an app or Automator Workflow that should be opened with a specific assigned link (based on criteria like the URL host, or URL scheme), instead of being downloaded in Transloader. This way, you can send ftp:// links directly to your favorite FTP app.
File Actions make Transloader open specific files it has downloaded with an app or Automator Workflow you choose – based on criteria like the downloaded file’s type, or the original URL’s host. As an example, you could use this to organize downloaded files into folders automatically.
– Share Extension Start downloads on Macs right from within your browser, or any other app that supports sharing links – on any device.
– Save links for later Whether your desired Mac is not yet activated with Transloader, or you’d just like to wait for a later time until you start a download, you can now save links in Transloader for later, and assign them whenever you please.
– Push Notifications Transloader can inform you about the status of your downloads, and that of your Macs.
– New App for iPhone and iPad Alongside the new Mac app comes – naturally – a new iOS app. Among other key features, the app now supports gestures, drag and drop, keyboard shortcuts, Siri Shortcuts for powerful download workflows, and a Share extension, which works like the Mac version’s.
Can I see more of Transloader in action?
What are Transloader’s requirements?
– An iCloud account – At least one Mac with macOS 10.14 or newer – An optional iPhone and/or iPad with iOS 14 or newer with the free iOS Transloader app
I hope you’ll enjoy this new version of Transloader for Mac, iPhone and iPad. Should you have any feedback or questions, please don’t hesitate to write me! If you’re a member of the press and would like to get in touch, please feel free to do so at any time!