Archive for January 26, 2018

Friday, January 26, 2018

iCloud Photo Library Re-uploading

Adam C. Engst:

Messages wasn’t getting or sending messages, Wi-Fi calling wasn’t working, and after upgrading to 10.13.3, I was unable to enable auto-unlock with my Apple Watch. To solve these problems, I turned iCloud off and back on. Despite the iCloud preference pane throwing an ominous error, the problems did indeed disappear.

However, there’s a nasty side effect of turning iCloud off and back on: iCloud Photo Library needs to re-upload all your photos. It does this in order to compare the library’s contents to the synchronization “truth” at iCloud. Fair enough, except that this process can take days, depending on the size of your Photos library and the speed of your Internet connection. Bad Apple! We don’t see that sort of poor performance with Dropbox or Google Drive, and this behavior is both unnecessary and driving people away from iCloud Photo Library.

It turns out that there are quite a few actions that can cause your entire Photos library to be re-uploaded to iCloud[…]


Why should Photos say at one point that my library is 113.03 GB, and then 94.6 GB at another? And do I have 30,875 photos, 30,879 photos, or some larger number that caused the iCloud progress count at the bottom of the Photos screen to report that it had 33,726 items to go, even though adding the number of photos and videos together never results in a number higher than 31,471. Come on, Apple, this is basic math, and discrepancies like this reduce user confidence.

Kirk McElhearn:

Adam suggests that not all the data is uploaded, but I watched it cripple my internet access for a week, since I could only allow it to upload overnight.

Hello HEIF

Gus Mueller:

Yesterday Apple released to developers the first beta of MacOS 10.13.4, and I was delighted to see that support for encoding HEIF images was included (finally). So naturally, and only a few hours later (sorry for the delay), I’ve got a pre-release version of Acorn which supports it.

We thought this would be in macOS 10.13.0, but better late than never. However:

Apple’s encoders both on iOS and MacOS only support 8 bits per channel. So that means if you were wanting to convert your RAW images to HEIF but you wanted to keep your color accuracy, you’re out of luck for now.

Previously: macOS 10.13 High Sierra Released, H.265/HEVC and HEIF.

Swift’s Reflective Underpinnings

Joe Groff (via Helge Heß):

People tend to think of static typing and Reflection as being diametrically opposed. But ultimately, I think we can come up with designs that marry the best aspects of both. Providing the expressivity and power of Reflection while still preserving the static reasoning capabilities of the type system.


When we cast to a protocol type, the runtime consults this table and searches for the implementation of that protocol if there is one. So using this technique, we can ask the same questions that we asked in Objective-C. “Do you respond to this method and if so, please respond.” And we can factor this out into a generic function, allowing us to avoid hard coding a particular responder protocol and use any protocol in our system as an action for responders to respond to.


The good news is that the runtime is fairly well set up to support this kind of query. Even though the implementation isn’t yet there in the standard library. Those type meta data objects that I talked about for Structs, Enums, and Classes, have a reference to what’s called the nominal type descriptor. And this contains fairly detailed information about the original definition of the type. It includes its name, it includes the module or parent type it was nested in, and it includes a fairly detailed account of its layout as well.


Swifts type system was carefully designed to support either specialization or runtime dynamic dispatch with the same source code. And no matter what implementation you use, you get type safety from the compiler.

So I wonder whether we could do the same thing for reflecting over the shapes of types.

See also: SE-0195: Introduce User-defined “Dynamic Member Lookup” Types.

Recommendations for Buying Music

Ruffin Bailey:

Seems like folks like me are being underserved. It’s not that we don’t like to buy music. In many cases, it’s the opposite. I buy more albums & tracks each year than I’d like to count.

Why don’t any of these music cloud services provide good, ad-free recommendation services for music buyers, not renters, like me? They’re sitting on millions of people’s listening habits. Why not convince me to buy more with spot-on suggestions?


Why can’t folks who are stuck in 2007 get good recommendations from Apple Music? Why can’t I play even the stuff I’ve purchased from Apple on the Android Apple Music app? Why doesn’t Apple try to sell and sell me good music? Why does Apple Music feel like a closed system, and the iTunes Music Store feel a little Tower a month or two before they started discounting for clearance?

Previously: Eliminating iTunes Store Music Downloads.

Old-Style Apple API DIffs

Steve Troughton-Smith:

If you find Apple’s new API diffs impossible to discover & navigate like I do, check out @mattstevens’ old-style diffs for iOS 11.3

The new ones are pretty but require too much clicking and scrolling to see what’s new. For example, compare this page showing the new HEIF methods in CoreImage vs. first clicking on Core Image, then CIContext, then scrolling down to find the new methods. Also, Apple’s diffs mark seemingly every type changed to add conformance with Equatable and Hashable, but that’s really a change to Swift, not a mass change of all the APIs.

Creating a Bootable APFS Clone From the Command Line

BeLight Software:

Activate on-disk ownership on your disk volume with the help of vsdbutil tool.


Create Preboot volume in APFS container disk3 that includes BackupClone[…]


Update dyld’s shared cache on clone volume using update_dyld_shared_cache tool[…]

Personally, I would use SuperDuper or Carbon Copy Cloner to create an actual clone, but it’s instructive to see these steps using rsync and Apple tools such as vsdbutil, diskutil, and bless.

Previously: SuperDuper and APFS.

Tim Cook on Coding

Josh McConnell (via Slashdot):

Cook surprised a class of Grade 7 students in Toronto’s east end as they learned how to program robots to dance on tables using Apple’s Swift programming language, recently introduced by the company as a low-barrier-to-entry way of coding.

“Swift came out of the fundamental recognition that coding languages were too geeky. Most students would look at them and say, ‘that’s not for me,’ ” Cook said as the preteens participated in an Apple-designed “Everyone Can Code” workshop, which helps children learn how to build mobile apps, at the Apple Store in Toronto’s Eaton Centre.

“That’s not our view. Our view is that coding is a horizontal skill like your native languages or mathematics, so we wanted to design a programming language that is as easy to learn as our products are to use.”

I like Swift. But, having programmed in probably more than a dozen languages, I would not classify Swift as easy to learn. It’s at the end with the harder ones like C++. It’s complicated enough that I’m not sure there’s anyone, even among those creating it, who fully understands all the nooks and crannies. It’s definitely a geeky language.

Now, maybe Cook meant that the basics are easy to pick up. I suppose that’s true, but I would’t say that the basics are easier in Swift than in, say, Python. Playgrounds notwithstanding, Swift does not feel like a clean, easy teaching language to me; it’s more of a pragmatic tool for professionals.

Consider the simple example of removing an object from an array. In Python, it’s list.remove(object). In Objective-C it’s [array removeObject:object]. (Yes, I’m aware these behave differently.) There’s no method that does this in Swift 4. There’s currently an enhancement proposal in review, but it looks like even then you would need to pass a closure rather than an object. I’m not saying that’s necessarily the wrong design—in fact it’s very pragmatic—but it’s certainly not the one that’s easiest to learn.

See also: Kirk McElhearn, Riccardo Mori.

Update (2018-01-26): See also: Nick Lockwood and Bob Burrough.

Update (2018-06-05): Nick Lockwood:

Tim Cook once again repeated the claim that Apple built Swift as a way to make programming easy to learn for everyone.

I like Swift a lot, but it is by far the most complex and nuanced language I have ever used. It will take me a decade to fully master it.

2017 Six Colors Apple Report Card

Jason Snell:

It’s time for our annual look back on Apple’s performance during the past year, as seen through the eyes of writers, editors, developers, podcasters, and other people who spend an awful lot of time thinking about Apple.

This is the third year that I’ve presented this survey to a hand-selected group. They were prompted with 11 different Apple-related subjects, and asked to rate them on a scale from 1 to 5, as well as optionally provide text commentary on their vote.

My grades were pretty much in line with the panel’s except on Cloud Services. I’m still seeing basic reliability issues with iCloud Drive, iCloud Photo Library, iMessage, and Siri.

Previously: Six Colors’ 2016 Apple Report Card, Apple in 2018.

Update (2018-01-26): Nick Heer:

When I posted last year’s report card, I noted that 2016 was a bad year for software quality. 2017 makes 2016 look alright by comparison.

Nick Heer:

That’s what I get for praising iCloud yesterday.

Update (2018-01-27): See also: Hacker News.