Archive for November 1, 2018

Thursday, November 1, 2018

SuperDuper’s Smart Wake

Dave Nanian:

Apple, of course, has its own “dark wake” feature, used by Power Nap. Dark wake, as is suggested by the name, wakes a system without turning on the screen. However, it’s not available to 3rd party applications and has task-specific limitations that tease but do not deliver a solution here.

And you can’t put up a black screen on wake, or adjust the brightness, because it’s too late by the time the wake happens.


Basically, if we are running a minute before the backup is scheduled to run, we assume we’re also going to be running a minute later, and cancel any pending wakes for that time. So, if we have an event for 3am, at 2:59am we cancel that wake if we’re already running.

That ensures that a system that’s already awake will not wake the screen, whereas a system that’s sleeping will wake as expected.

SuperDuper deserves an award for sweating so many details like this. Nanian’s posts are a sobering reminder of the difference between theory and practice in app development. A direct API is often missing, so you need to find roundabout solutions. And much remains undocumented and unreliable.

Update (2018-11-05): Dave Nanian:

The result of the rather intensive stress testing: once over about 700 sdautomatedcopycontrollers are queued up waiting, things get weird.

In case it isn’t obvious: no one would ever do that. But it shouldn’t ever get weird, so I’m trying to fix it anyway.

macOS 10.14.1

Howard Oakley:

If you’re not yet convinced that Apple makes major changes to apps without any corresponding increase in version number, consider FaceTime. In Mojave 10.14, FaceTime 5.0 had no support for Group FaceTime; in 10.14.1, that support – one of Mojave’s headline features – is at last introduced, but the app version number remains unchanged. This calls into question the whole purpose of version numbers.


There have been updates to ssh, which may improve its issues over bypassing TCC’s privacy controls.

Howard Oakley:

This article lists bugs which you and I have encountered in macOS Mojave 10.14.1 itself, rather than issues in specific third-party applications and other software.

Previously: macOS 10.14 Mojave Released, Bypassing Mojave Security Protections, Group FaceTime Delayed.

Update (2018-11-06): See also: Apple.

Making Cesium API-Safe

Mike Clay:

Cesium now contains a sizeable chunk of features that have been built upon undocumented functionality and characteristics of the iOS media player API. Undocumented doesn’t mean restricted or forbidden, but it is subject to change without notice. Through the first half of Cesiums life these changes were very minimal. In some instances they could even be exploited to provide new features or improve performance. It was fine as long as it kept working, but it was built on sand. In iOS 11, and now 12, that sand shifted leaving a whole family of interrelated features teetering precariously. For the last 18 months a huge portion of my available development time has been taken up with tinkering like a mechanic trying to keep an old jalopy on the road.


For the last week or so I have been working on a new, API-safe branch of Cesium. A version of the app based (almost) exclusively on documented API features. Certainly in regards to the media player API. The idea is to do only what can be done well, reasonably “safely,” and future-proof. The casualties would look something like this[…]

It is surprising how little the music APIs support.

Previously: What’s Going on With Cesium.

Swift’s “if case let” Syntax

Zoe Smith (via Jim Correia):

case let immediately precedes the candidate pattern in both versions. However, when using if case let the value comes after the = operator


case let is a shortcut so all subsequent associated values can be bound just by providing variable names.


Add conditions to if and guard using commas


Iterate using for, where and logical operators

See also: Swift Closures and Objective-C Blocks.