mac os x

2 ScreenFloat Icon 3  dragged

I’m happy to announce the immediate availability of ScreenFloat v1.5.14 – an admittedly long overdue maintenance update that fixes a couple of issues:

  • A semi-rare crash, that occurred when dragging the mini-icon of a floating shot, was fixed
  • Cancelling a mini-icon-drag by pressing ‘esc’ actually works now
  • Fixed a bug where a cleared keyboard shortcut would reset to its default after a restart of the app
  • Fixed an interface bug where, after sharing a shot, the standard window buttons would appear on the floating shot
  • Fixed a bug where the app would seemingly freeze when “Save as…” and “New Folder” was selected

What’s ScreenFloat?
ScreenFloat lets you take screenshots that float above all windows, so as to keep information always visible (following you around different spaces, windows and full-screen apps).

  • Need to transfer bank account information from a mail to your online banking tool? ScreenFloat!
  • Want to keep a reference image visible? ScreenFloat!
  • Want to just remember a bit of information for a minute? ScreenFloat!
  • The use-cases seem endless (and *are* endless – believe me, I use it all day, all the time 😉 )

While the main “raison d’être” is this floating functionality, ScreenFloat offers a Shots Browser that keeps all the screenshots you take in a neat library you can curate (via titles, tags and (smart) collections).

Each floating shot has a draggable mini-image-icon at the lower left, so you can quickly drag any screenshot you take to other apps, like Messages, Mail, or Twitter, for example.

Links:
ScreenFloat Website (with free, 15-day trial)
ScreenFloat on the Mac App Store

What’s Next?
Looking ahead, I’m working on a substantial v2.0 upgrade of ScreenFloat which will include features like annotations and sync (via iCloud), and I’m also looking into an iOS companion app down the road.
So, although there haven’t been a lot of updates lately for ScreenFloat (mainly because Yoink has been keeping me very busy), I do have lots of plans and love for the app.

 

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 🙂

Read more

What’s Yoink?

Yoink is an app for Mac, iPad and iPhone that speeds up your daily workflow by simplifying and improving drag and drop.
It accepts almost anything you can drag and stores it for you for later use, like a shelf to temporarily “hold something” for you.

Yoink for Mac Update + SALE (25% off!)

Yoink v3.4.2, available now on the Mac App Store, is a minor maintenance update recommended to everyone using the app.
The update brings improved compatibility with Firefox, Sketch and upcoming versions of Safari, as well as more reliable fetching of favicons (in, where possible, higher resolution) for URLs saved in Yoink.

As I’m sponsoring this week’s AppStories Podcast Episode, Yoink for Mac is – for the entirety of the week – on sale, about 25% off its regular price!

Links:
Yoink for Mac Website (with a free, 15-day trial)
Yoink for Mac Usage Tips
Yoink on the Mac App Store (25% off for the week)

Yoink for iPad and iPhone Update

Yoink v1.1.1, available now on the App Store, is also a maintenance update, albeit a larger one.

Among the more than 30 changes, improvements, bug fixes and new features in this update, version 1.1.1 brings:
– Live monitoring of your clipboard when used in Side-by-Side or Slide-Over mode
– Yoink’s Today Widget now offers a way to access all of Yoink’s items, instead of only the 3 most recent ones
– Improvements for item previews
– Downloads now show their progress in percent
– Improved reliability of all of Yoink’s extensions (the keyboard, Today Widget, Action/Share extension and File Provider)
– Fixed many (more or less rare) crashes in Yoink and its extensions

Links:
Yoink for iPad and iPhone Website
Yoink for iPad and iPhone Usage Tips
Yoink on the App Store

Video of Yoink’s new “live clipboard observer”

Video of Yoink’s updated Today Widget

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 🙂

Read more

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 🙂

Read more

In iOS Simulator, you can, via a menu item, quickly simulate memory pressure for the simulated device to see if your app behaves correctly under low memory conditions (releasing caches, cleaning up resources, and so on).

Recently, I had the need for it on the Mac (where such a menu item is not available), while working on an XPC service for Yoink, to see if it terminated properly under certain conditions.

Meet the memory_pressure tool

OS X comes with the Terminal, and with the Terminal come some awesome tools. Among them is memory_pressure. Its man page says it all:

Apply real or simulate memory pressure on the system.

Usage of memory_tool

sudo memory_pressure -S -l critical

What this does is simulate (-S) a memory pressure of a critical level (-l critical).
sudo is needed, otherwise it will probably fail with an “Operation not permitted” error.

memory_tool’s options

-l:   Two levels of pressure are supported: ‘warn’ and ‘critical’.
-p:  For real pressure, this lets you define how much memory should remain free, in percent of total memory.
-S:  Simulate memory pressure, don’t really allocate memory.
-s:   If applying real pressure, this is the duration to wait before allocating or freeing memory.
       If it’s simulated pressure, the system will be maintained at an artificial memory level for this duration.

Read more