Developer Tip: Avoiding the Discrete GPU

December 16th, 2016

So I’ve run into this issue both as a user and as a developer – on MacBook Pros that have both a discrete and integrated GPU, fancy animations will cause the system to switch to the more powerful discrete GPU, reducing battery life. Chris Liscio wrote a great post explaining what’s going on and what to do about it (from a developer’s perspective). The key takeaway for most developers:

This whole problem can be very easy to solve. You just have to set NSSupportsAutomaticGraphicsSwitching key to YES in your application’s Info.plist. The trouble is that an OpenGL context is being created, which defaults to switching the dGPU on. Enabling this flag in the plist will very likely fix the problem on its own, as the frameworks should Do the Right Thing (more details below) if they need access to OpenGL.

Go read his whole post for all the details.

 

Default Folder X 5.1 delivers more power in Open & Save dialogs

December 13th, 2016

Default Folder 5.1 is now available, and includes a long list of changes. Key among them are new commands that let you copy, move, and make aliases to files and folders right in your file dialogs. Want to save a copy of that file to your Desktop folder before you make changes to it? Just use the Copy command in Default Folder X’s toolbar and choose the Desktop as its destination.

Default Folder X will now also mirror all of your favorite folders, recent folders and recent files using aliases in your Library folder. If you use another file management utility like Path Finder, Alfred, LaunchBar, etc for quick access to files and folders, you can connect it with your Default Folder X data by pointing it to these folders:

HOME/Library/Favorites/
HOME/Library/Recent Folders/
HOME/Library/Recent Files/

There are other convenient additions as well, like the ability to change the creation and modification dates of files and folders, and Command-selecting an item from a Default Folder X menu to reveal it in the Finder.

And as usual, there are also compatibility improvements and bug fixes – quite a lot of them this time. While Default Folder X has been performing very well for nearly everyone, the automated crash logs have uncovered a handful of infrequent but persistent problems. I’ve done a lot of stress-testing and debugging to ferret them out, making this release more reliable – and thereby less annoying for both you and me 🙂

For a complete list of changes, bug fixes and download links, check out the Default Folder X Release page!

Sal Soghoian’s position eliminated at Apple

November 17th, 2016

Wait. Who? Sal Soghoian is Product Manager of Automation Technologies at Apple. That basically means he has been the motivating force behind AppleScript, Automator, application scriptability and the technologies that underly them. He’s been doing it for the last 20 years, and I don’t think most Mac users understand how important his influence has been to the platform we use and love. He’ll be leaving Apple on December 1, as his position has been “eliminated for business reasons.”

While I’ve met Sal several times, I don’t know him on a personal level. I’ve seen him speak numerous times, and like many long-time Mac developers, have benefited from his passion and consistent evangelism of system-level scriptability.

Why do I care? Indeed – why do we care about this? Well, let’s rewind a bit and set some groundwork for why Sal’s contributions matter so much.

Interoperability – from Copy/Paste to AppleScript. We all take copy and paste for granted – of course I can copy an image out of Photoshop and paste it into Mail, right? Well, it didn’t always work so easily – the Mac was the first major platform that standardized that by providing system-level support for standard image types and an extensible way to move them between applications. The key was that it was natively supported by the system, so developers could add it to their apps and it worked the same way, with the same basic data formats, in all applications. You could copy and paste between any applications.

Like copy and paste, in 1993 Apple added system-level support for scripting. Instead of every developer inventing their own custom scripting language that only worked in their application, Apple created AppleScript – and more crucially, AppleEvents beneath it that provided a rich way to send commands and data from one application to another. Many applications have scripting dictionaries built into them, letting you, or any application, send commands to do useful stuff.

Anyone can create simple or hugely complicated AppleScripts to do all sorts of things – from changing the format of all image files in a folder to automating email handling to batch-processing audio and video clips for movies. You can use all the best-of-breed tools on the Mac and string them into workflows that meet your specific needs. That’s always been one of the Mac’s big advantages – you can combine applications to accomplish more than any of the individual apps can do themselves. Apple’s Automator application even tried to make this accessible to everyone – with varying levels of success, depending on who you talk to.

But I don’t use AppleScript. So I don’t care, right? You may not directly use AppleScript, but many applications use AppleScript or AppleEvents in lots of little ways. iTunes, for example, lets you pause, play, go forward and backward a track, change playlists, add properties to songs, and a zillion other things. Those little iTunes controller apps that live in your menubar or dock? They use AppleScript to talk to iTunes. The ones that add lyrics to the currently playing song at the push of a button? Yup, AppleScript. Applications that grab the current page from your browser? AppleScript. The “contact us” button in an app that automatically creates an email in Mail with a subject and the To: address filled in? AppleScript. There’s probably something on your Mac that uses AppleScript or AppleEvents, even though you’re not aware of it.

So where does Sal come in? Sal is the guy at Apple who has kept this whole vision alive. He prodded developers to add AppleScript capabilities to their applications. He kept system-level scripting a priority – or at least on the radar – at Apple. He spoke at WWDC and numerous other conferences, showing how powerful the technology was. He explained to developers how a little work on their end could yield huge benefits for scripting-aware users.

My fear is that with Sal’s departure, Apple’s waning interest in scripting, and application interoperability in general, will be gone for good.

Losing interoperability. So if system-level scriptability disappears, what do we lose? For starters, it makes it harder for one application to talk to another or to use another application’s capabilities. Those iTunes controllers wouldn’t be able to talk to iTunes. My own product, Default Folder X, tracks your recently-used folders and then lets you go back to one of them in the Finder, Path Finder or Terminal. The latter two wouldn’t be possible (or would be much harder) without AppleScript. And when someone tweeted me that they wanted to use iTerm2 instead of Terminal, I could add that in 10 minutes because iTerm2 supports AppleScript.

Yes, those are little things, but sometimes they’re the little things that separate an acceptable application from an awesome one. I’ve always felt that the interoperability between Mac applications was one of the things that distinguished the Mac from other platforms like Windows. Even when you can get the same applications on both OS’s, everything is just tied together better on the Mac. I hope that doesn’t change.

Oh, and if you do use AppleScript? Yeah, this sucks even more.

Jettison 1.5.3 corrects several bugs

November 13th, 2016

Version 1.5.3 of Jettison is now available, correcting a couple of bugs that could cause Jettison to crash. The folks that reported the bug simply noticed that Jettison’s icon would disappear from their menubar sometime during the day. The new version should eliminate that problem.

You can update your copy by downloading version 1.5.3 from the Jettison Release Page or by selecting “Check for Updates” from Jettison’s menu in your menubar.

HistoryHound and Jettison Updates

November 2nd, 2016

128HistoryHound 1.9.12 and Jettison 1.5.2 both deliver stability improvements and bug fixes to make sure they run without issue on El Capitan and Sierra.

Icon.pngHistoryHound also includes better error handling and its indexing is more intelligent when it encounters web pages that redirect you to a new page. You can now click on status messages in the main window to show you the status of indexing and the contents of your search index, and HistoryHound 1.9.12 supports the Vivaldi browser as well as Safari, Chrome, Firefox, OmniWeb, iCab, Opera, NetNewsWire and URL Manager Pro.

Full lists of changes and download links are available on the HistoryHound release page and the Jettison release page.

Dash gone from the App Store – what the heck, Apple?

October 6th, 2016

Just a random PSA for developers: This just happened:

https://blog.kapeli.com/apple-removed-dash-from-the-app-store#what-happened

Summary: Bogdan Popescu, the developer of Dash (one of the most awesome programmer’s reference tools ever), contacted Apple to convert his personal developer account into a company account. Apple started the process, then disabled his personal account and revoked his permission to sell apps on the App Store. It looks like another capricious and supremely unhelpful App Store move from Apple. Thanks guys – you make it so much fun to develop for your platforms.

Default Folder X 5.0.7 brings fixes for Sierra

September 29th, 2016

Default Folder X 5.0.7 is now available. It includes a couple of important compatibility fixes for Sierra, while also offering resizable preference windows for you folks that like to add a lot of Favorites or default folders.

The biggest deal is a fix for Default Folder X’s handling of Save dialogs. In version 5.0.6, if a Save dialog came up ‘minimized’ – meaning it wasn’t showing the file listing – then Default Folder X wouldn’t show up. And it wouldn’t even add its controls if you un-minimized the dialog with the little button next to the filename edit box. You had to un-minimize the dialog, then hit Cancel, then Save again to get everything to show up correctly – not helpful.

There’s a full list of the changes and links to download version 5.0.7 on the Default Folder X ‘What’s New’ page. Or you can just select “Check for Updates…” from Default Folder X’s menu in your menubar if you’re running an earlier version. Please update to get these latest fixes – they’re important.

More Updates! App Tamer 2.2 and Jettison 1.5.1

August 31st, 2016

Yes, I’ve been busy over here! There are Sierra-compatible updates for both App Tamer and Jettison today, with both offering additional fixes and enhancements as well as support for macOS 10.12.

circle_menuApp Tamer 2.2: While I’ll be the first to admit that App Tamer is a bit of a niche product (you’ve got to be a little geeky to like the details of what it does), I’m excited by the improvements in this release. It’s more intelligent about identifying which processes are “helpers” for others, and can therefore do a much better job at throttling all those Safari Web Content processes when it limits Safari’s CPU usage, for example, while still letting the Mail Web Content helpers run at full tilt for Mail (if that’s what you want).

App Tamer’s basic process management is also more efficient now, so it all adds up to it doing its job better. If you’ve got apps that are sucking down CPU (and battery!) while they’re sitting in the background, App Tamer can help you out. More details and download links are on the App Tamer What’s New page.

Icon.pngJettison 1.5.1: The Jettison update addresses issues with Sierra, and also gives you the option to unmount rather than eject drives when your Mac sleeps. “Why do I care?” you say? Well, I’m glad you asked (and you might be too)! Some SD cards and Flash drives won’t remount properly after being ejected, even when Jettison reloads their device drivers. That can result in you having to do a really inconvenient little dance of unplugging them and plugging them back in to get them to show up. Turning on this new option in your Jettison prefs avoids that.

There are also bug fixes for Jettison’s handling of network drives, removal of some logic that checked whether the display was going to sleep before ejecting disks (long story – it did solve a problem, but created even more in the end), and tweaks to better handle OS X’s propensity to report errors when there are none. Go visit the Jettison What’s New page for a list of changes and download links.

Now here’s hoping that Apple doesn’t make any major changes to Sierra before it comes out of beta that require me to update these Sierra-compatible updates 🙂

Default Folder X 5.0.6: Sierra support, bug and compatibility fixes, and a few new things

August 30th, 2016

Shot1 Version 5.0.6 of Default Folder X is officially out! It’s the product of a lot of bug-chasing and wrangling of little details, especially where Sierra is concerned. I know there are still features that some of you are waiting for – I still have a long To-Do list – I haven’t forgotten.

In addition to supporting macOS 10.12, this update delivers a few often-requested features, including the ability to keep your Favorites sorted by name and better interoperability with LaunchBar. It also addresses some occasional glitches and compatibility issues, and starts up more quickly than previous versions.

If you’re running Sierra, El Capitan or Yosemite, you should update to this version, as most of the improvements apply to all versions of macOS, not just Sierra.

There’s a full change list and download links on the Default Folder X What’s New page. Have at it!

And stay tuned for updates to App Tamer and Jettison as well – they’ll be here shortly.

Default Folder X 5.0.6b5 fixes some glitches with Sierra betas

August 17th, 2016

There’s a new public beta of Default Folder X that addresses issues with the latest beta releases of macOS 10.12 Sierra. I’m also testing some changes to Default Folder X’s activation method that get rid of problems with it occasionally not loading in some applications, as well as fixing a hang that could occur under some circumstances. Oh, and there’s also improved support for LaunchBar.

You can see the full change history and download a copy from the Default Folder X Testing page.

If you’re running App Tamer, make sure you get a copy of the latest App Tamer Beta too.