What I.. (October 2016)

“What I…” is a monthly column where I talk about what’s been going on in my life as an indie Mac and iOS developer during the last month.

… Did

Released Yoink v3.2.5 (blogmac app store, website)

Yoink, an app that improves and simplifies drag and drop on your Mac, has received a maintenance update.
Most importantly (based on the mails I received), this update fixes an issue with Photos.app on macOS Sierra, where Yoink wouldn’t properly accept photos dragged to it.
Additionally, it improves the app’s energy footprint and CPU usage, and fixes a couple of bugs here and there.
The update also fixes my “inactive checkbox” dilemma (see below).

More work on Transloader 3 (mac app store, app store, website)

I started migrating the app’s download mechanism from NSURLDownload to NSURLSession.
It works well (even background transfers), but there are a few caveats with FTP URLs.
Background downloads do not work with FTP URLs, and re-starting them (after they failed, for example) is iffy.
It’s interesting, because if I start an FTP download, stop it, then re-start the download, it often doesn’t work.
But if I start the download, stop it, quit and restart the app and the download, it works instantly. It may be some kind of internal caching in the NSURLSession system for FTP URLs (as http(s) works fine).

Released SiriMote v1.2.5 (website)

macOS Sierra caused SiriMote to misbehave – play/pause and volume up/down would not work properly.
The reason: macOS Sierra has rudimentary support for the Apple TV Siri Remote. You guessed it – exactly those three buttons.
So when you pressed play with SiriMote running, the system would receive the button press and start to play, then SiriMote would receive it and pause again.
SiriMote 1.2.5 disables those three buttons (temporarily while I look into other options) to make it play nice with Apple’s new operating system.

Guest Blog Post: The Story Behind Claquette – Animated Screenshots (blog)

A great post that goes into a lot of detail of what makes GIFs GIFs and creating the Mac app Claquette.
If you haven’t read it, I suggest you do – Thomas sure knows what he’s writing about here.

Blogged: How to badge an App’s Icon in the Dock (blog)

Inspired by a conversation with Jeff Johnson (of ClickToFlash fame), I wrote a quick tutorial on how to badge an app’s icon in the Dock while respecting System Preferences/Notifications’ settings.

Blogged: Follow-Up: Inactive Checkboxes Are Poor UX (blog)

After releasing Yoink v3.2.5, I finally was able to post my follow-up on my “inactive checkboxes” blog post.

Blogged: Yoink’s Revenue a Month After Localizing It (blog)

I saw a spike in Japan and China after translating Yoink into those languages.

… Thought About

Apple’s “hello again” Event

I couldn’t care less about the Apple TV TV app that won’t ever work outside the US anyway (*ahem* Apple News *ahem*), so let’s move on to what mattered (or didn’t).
So, the maximum amount of RAM in the new MBPs is 16 GB, because 32 GB would draw too much power, yet they decided to reduce the battery from a previous 99.5 watt-hour capacity to a 76 watt-hour capacity.
Yes, they couldn’t increase the battery due to in-flight laws, but did they have to reduce it, only to make it a little thinner, and then say 32 GB draws too much power? How’s that designing “for the experience” of a ‘pro’ laptop?
When the first thing they talk about during the introduction of new hardware is how much thinner it is, you know where Apple’s priorities are.
It’s not putting ‘pro’ hardware into a ‘pro’ laptop. It’s making it look good.
The CPU was not really mentioned in the keynote, so it’s likely not that big of an improvement over the previous generation.
And don’t get me started about the ports. I love Thunderbolt, but not being able to connect a brand new out-of-the-box iPhone to a brand new out-of-the-box MacBook Pro without extra dongles…
What happened to “it just works”? This is what Apple used to excel at!
I’m not saying these machines aren’t good. They probably are the best MacBook Pros (or MacBooks Pro? or MacBook Pro devices?).
But why not make them even better? Do professionals really care about thinner when they’re thin enough already?
I’m writing this on a rMBP from mid-2012 and I still marvel at the thinness of the thing. Why not keep it at that level and improve the performance in a way that blows every other laptop out there out of the water?
Where is the courage to say “it’s as thin as last year, but it’s so much more powerful”?
That being said, I do like some of the stuff they did with those new machines.
I like the Touch Bar and have already started working it into some of my apps (particularly, Transloader and Glimpses – it’s too bad background apps can not really put anything into the Touch Bar).
I like the bigger touchpad.
I like that you can charge it from either the left-hand- or right-hand-side ports.
And, after all, I do like the way it looks.
But why not make the MacBook the thinnest Apple can make, and the MacBook Pro the most powerful Apple can make?

… Downloaded

EasyRes App IconEasyRes (mac app store, website)

This app lets you quickly change your screens’ resolutions via a menu bar item (or the Notification Center).

Screenshot of EasyRes in Action

EasyRes in action (screenshot from the Mac App Store)

It shows more resolutions than System Preferences/Displays, that’s what makes this app very useful.

… Read

Does the Mac Still Matter? (cnet)

“We did spend a great deal of time looking at this a number of years ago and came to the conclusion that to make the best personal computer, you can’t try to turn MacOS into an iPhone.”

Is Metal a Game Changer? An Interview with Feral Interactive (macgamerhq)

“It’s not about making development easier exactly, but the new features in Metal certainly make more games feasible on Mac”

Why Apple’s MacBook Touch Bar was the Right Thing To Do (techcrunch)

“Having a discrete bar that can update with context (…) makes total sense. Far more sense than bolting a touch screen onto a non-touch-optimized OS and forcing you to poke at tiny buttons meant for a mouse.”

Experimenting with App Store Search Ads (glimsoft)

“I’ve been thinking about it some more, and it seems like participating in Search Ads will almost be mandatory, if you want any source of traffic from App Store Search.”

iPhone 7 Plus Depth Effect is Legit (prolost)

“Sometimes that makes the photo prettier. Often, it can make the photo.”

… Watched

Blair Witch Movie PosterBlair Witch (itunes)

Only recently I found out a new movie in the Blair Witch franchise would be released (as it was kept under wraps during production).
I loved the first one and despised the second one, so this movie could have gone both ways. And it did.
I liked it in general, but some elements were just a blatant copy of the original, which is kind of sad. But it was scary, and that was what I was looking for. So the movie delivered, but I still felt a bit disappointed.

… Ate

Krautstrudel

Krautstrudel

… Went to See

Me lying in a coffin

“The Long Night of Museums” – My girlfriend and I went to the cemetery, where you could try lying in a coffin. It’s eerily comfortable.

My girlfriend Britta and I at the Austrian Bundeskanzleramt

We also went to the Austrian Bundeskanzleramt. The chancellor was nowhere to be seen, his office closed. Big let-down. But we got a nice picture out of it.

Eternal Storms Software Logo

– – – Do you enjoy my blog and/or my software? – – –
Stay up-to-date on all things Eternal Storms Software and join my low-frequency newsletter (one mail a month at most).
Thank you 🙂

How to Badge an App’s Icon in the Dock

An app icon badged with 'Badge'

A recent conversation I had with Jeff Johnson (of ClickToFlash fame, @lapcatsoftware on twitter) prompted me to look into how badging an app’s icon in macOS’ Dock works.

There were a couple of questions that needed answering:

  • Does badging happen automatically when sending an NSUserNotification?
  • If not, how do I apply a badge to my app’s icon in the first place?
  • How do I retrieve and respect the user’s Notification settings for the app in System Preferences?

Automatic Badging by Sending a NSUserNotification?

NSUserNotification Notification

Nope, automatic badging doesn’t happen. Even though System Preferences -> Notifications suggests that badges and notifications belong together, in code, they’re separated.
That means you have to add the badge to your app’s icon yourself. Also, you need to keep track of whatever number you want to display with the badge and update or clear it at appropriate times.

For example, Mail.app uses the badge to display the amount of unread eMails you have. The badge doesn’t clear when you activate Mail and only decreases when you mark mails as read.
Transmission, on the other hand, informs you about how many downloads have finished since you last had the app active. Once you activate the app again, the badge gets cleared and re-starts from zero.

How to Badge the App’s Icon?

Badging is straightforward:

NSApp.dockTile.badgeLabel = @"Badge";

Please note that putting text into the badge is not a good idea – I did it here just for fun, but text in the badge is very limited and if you have a longer string, what you’ll end up with is something like “A….z”.
It’s best to stick with numbers.

Respecting System Preferences’ Notifications Settings?

If you only use badges (without notifications), you’ll notice your app is missing from System Preferences’ Notifications preference pane.
That can pose a problem, because now you either have to create your own user-setting for badges or the user will have no way of turning them off.
The trick, then, lies with NSUserNotification. Not in the API itself, but in two crucial steps:

  1. Code sign your app.
  2. Add this key-value pair to your Info.plist: NSUserNotificationAlertStyle with a string value of either banner (recommended by Apple) or alert.
    Supposedly, there’s another value, none, but that hasn’t worked for me yet – the app won’t appear in the Notifications preference pane.

Having the key-value pair in your Info.plist has no downside if you don’t use NSUserNotifications. There’s only the upside of having the user be able to disable your app’s badges if they like.

Now that the user can change the setting for your app’s badges, how do you read it out to see if you should badge or not? It’s easier than you think: you don’t.
Just like the system doesn’t show your NSUserNotifications if the user has disabled them for your app, the Dock simply doesn’t display your badge if the user has disabled it in System Preferences.

All you have to do is keep track of the number that should be displayed in the badge, and that you update or clear it at appropriate times.
For example, you might not want to have the badge visible when the user quits your app, so you could set -badgeLabel to nil in -applicationWillTerminate:.

By the way, if you ever need to reset System Preferences – Notifications for your app (or all apps), there’s a nice how-to on stackoverflow.

Happy badging 🙂

Update: Jeff Johnson follows up with some more tips and tricks about NSUserNotification in this blog post.

Eternal Storms Software Logo

– – – Do you enjoy my blog and/or my software? – – –
Stay up-to-date on all things Eternal Storms Software and join my low-frequency newsletter (one mail a month at most).
Thank you 🙂

Follow-Up: Inactive Checkboxes Are Poor UX

[This is a follow-up to this blog post. It was inspired by the response I received through social media and different websites.]

In a previous version of Yoink, I had the following conundrum:

Yoink 3.2 Preferences Inactive Checkbox

The checkbox “Show window near mouse pointer when drag is initiated” is inactive and needs extra steps to be activated.
If I’m a new user of the app, at first, I have no idea how to activate that checkbox. At best, it’s something I need to set in this preference panel, at worst it’s a setting in a different one.
As a new user, my only option is to blindly change settings, waiting for one to activate the checkbox so I can select it.

There are different solutions to this problem, of varying degrees of effective- and usefulness:

  • A tooltip. If the checkbox is inactive and you hover over it, a tooltip appears, explaining what to do to activate the checkbox.
    It’s a quick and easy solution, however, it’s almost undiscoverable. I know of many users who don’t even know tooltips exist.
  • Hiding the checkbox instead of having it be inactive.
    That’s better, as it reduces clutter (as the checkbox would be inactive anyway). But it introduces another problem – nobody knows that the option even exists.

“For that UI, I think maybe an additional improvement would be to actually hide and show the checkbox completely instead of disabling it.
Also, indent the second checkbox so that it feels like it’s a sub-section of the first.
Another option might be to split things out into radio buttons instead of checkboxes and the popup menu.
That way you could expose the additional option tied to the appropriate radio choice, which you can’t exactly do with the menu item.”

Manton Reece, via Core Intuition’s slack channel

  • Speaking of radio buttons, Adrien Maston wrote me a very detailed mail with some ideas he had about resolving the issue:
    Adrien Maston Radio Button Yoink

Since there are only two options for « automatically show when », maybe the setting could be radios instead of a select.
Then each option would be formatted as a column and each column would contain specific settings (the « drag starts » column would contain the « Show window near mouse pointer when drag is initiated » checkbox. Then it would make sens that clicking the checkbox would also set to « drag starts ».

Adrien Maston, via eMail

What I ended up doing in Yoink v3.2.1, the release that followed this discussion, was this:

Yoink 3.2.1 Preferences Active Checkbox

Instead of having the checkbox inactive, it’s active at all times and can be clicked right away. The advantage of this is that for one, the user knows the option exists and two, the user can select the option right away without having to figure out how to activate it.
The downside, and this has been pointed out to me a couple of times, and I agree, is that clicking the checkbox changes two settings at once (the checkbox and the popup, as you can see in the GIF above). It changes a setting the user has made before. And that’s bad UX design on its own right there.
My thinking was, it’s in the same preference pane, so the user sees what’s happening right away. It still was the wrong decision (as has been pointed out to me in the comments on designernews.co).

For Yoink v3.2.5, I re-thought the whole thing and decided to make it three options in a popup.
This is the result:

Yoink's Behavior Preference Pane in v3.2.5

It solves a couple of things:

  • The inactive checkbox is a thing of the past
  • The options you have for when and where Yoink should appear are much clearer
  • You get a preview video for every option so you know right away how each setting affects Yoink
Additionally, I think it’s the nicest Yoink’s Behavior preference pane has ever looked, so that’s a plus 😉

Eternal Storms Software Logo

– – – Do you enjoy my blog and/or my software? – – –
Stay up-to-date on all things Eternal Storms Software and join my low-frequency newsletter (one mail a month at most).
Thank you 🙂