Sunday, November 23, 2014

NSAtom, the True Object

Brian Webster:

In our case, if our method is returning a YES value, that will end up with a full value of 0x0000000000000001. If you try interpreting this value as an object, the runtime will think it is a tagged pointer, since the bottom bit is 1. OK then, so what kind of object is this exactly?


Ah, so it looks like, whether by design or by accident, no matter what message you send to NSAtom, it returns a value of 1.

Saturday, November 22, 2014

Updating Before Migrating to New Mac

Dave Winer:

It’s normally very easy to migrate, but this time they threw a curveball at me. In order to use the Migration Assistant, I have to upgrade the previous machine (the one I’m typing this on) to the latest Mac OS. That’s exactly what I don’t want to do. This is my safety net against incompatibilities in the new version of the OS.

That seems like a strange requirement for that reason—and also because the old Mac might not be able to run the latest OS. Apple’s documentation says:

Migration Assistant in Mavericks and Yosemite can transfer information from other computers that have OS X Snow Leopard v10.6.8 or later installed. If you’re migrating from a computer with an earlier version of OS X, update your older computer first, or manually copy your data from one computer to another.

Perhaps he misunderstood, and Migration Assistant only wanted him to update from 10.8.2 to 10.8.5. I don’t envy the person who had to write that error message.


I have been enjoying following the development of Helftone’s upcoming Monodraw ASCII art editor. I’m not sure that I would ever need to use such an application, but it is such an interesting idea, executed with characteristic passion and attention to detail. Inspiring.

Pricing Determines Your Business

Jason Cohen:

Price is inextricably linked to brand, product, and purchasing decisions — by whom, why, how, and when. Price is not an exercise in maximizing some micro-economic supply/demand curve, slapped post-facto onto the product. Rather, it fundamentally determines the nature of the product and the structure of the business that produces it.

Core Data Relationships Data Loss Bug

Tom Harrington notes that several developers (including James Dempsey and Rich Siegel) have encountered a bug with Core Data’s -[NSPersistentStoreCoordinator migratePersistentStore:toURL:options:withType:error:] method. This is supposed to copy the data store from one location to another, e.g. for making a backup. The frameworks may also call the method on your behalf, e.g. if the user does a Save As. The bug is that, on Yosemite and iOS 8, the method discards many-to-many relationships. This is actually worse than corrupting the file because the new file will still be readable, so it may not be obvious that it’s missing some of the data. The bug is reputed to affect all store types.

(DropDMG and EagleFiler use Core Data but not many-to-many relationships, so I don’t think they are affected.)

What Makes Clang So Special

CoderGears (via Maxime Chevalier):

The most important difference of its design is that Clang is based on LLVM, the idea behind LLVM is to use LLVM Intermediate Representation (IR), it’s like the bytecode for java. LLVM IR is designed to host mid-level analyses and transformations that you find in the optimizer section of a compiler. It was designed with many specific goals in mind, including supporting lightweight runtime optimizations, cross-function/interprocedural optimizations, whole program analysis, and aggressive restructuring transformations, etc. The most important aspect of it, though, is that it is itself defined as a first class language with well-defined semantics.

The Trials and Tribulations of Writing a 3rd Party iOS Keyboard

Alexei Baboulevitch (via iOS Dev Weekly):

I recently released my first commercial project: Translit Keyboard, a 3rd party keyboard for iPhone that lets you transliterate Latin characters into Cyrillic and some other alphabets.


This was a satisfying project to work on, giving me great insight into Swift, autolayout (since removed), Core Graphics, and a bit of Interface Builder. But it also gave me experience with something that I had yet to encounter in my sheltered iOS development existence: the horror of undercooked Apple frameworks and tools.

Below are as many of the problems I encountered during development as I can remember. I have high hopes that these will be fixed over the next few years, but until then, perhaps this article will help some poor programmer in dire straits!

Friday, November 21, 2014

iOS IPC via NSFileCoordinator and NSFilePresenter

Tom Harrington:

There’s still no full IPC mechanism on iOS. NSDistributedNotification hasn’t made the jump from OS X to iOS and probably never will. But file coordination and presentation can serve the same purpose, as long as the apps use the same app group.

When I was adding file coordination and presentation to my demo app, I realized that they could also be used for notifications between an app and its extensions. If one of them does a coordinated write while the other is using a file presenter for the file, the call to presentedItemDidChange happens almost instantly. Notification is the whole purpose of that method, so it makes sense it would work this way. I want to be notified if a specific file changes, and that’s how I get the notification.

But you don’t need to care about the file contents to be interested in notifications. If you just want a notification, choose a file name and use it as the notification mechanism. Any time one process needs to notify the other, make a change to the file. The other will get a file presenter call, and the notification is complete. It feels sort of like a hack but really this is exactly how the API is designed to work.

Update (2014-11-22): Apple TN2408 (via JanApotheker):

Using file coordination in an app extension to access a container shared with its containing app may result in a deadlock. This is usually the case if a process is suspended mid coordinated I/O. This can be more prevalent on iOS where most apps will be suspended after a short period of time after being moved to the background. Extensions should use alternatives to file coordination.


Regardless of this issue, the containing app (and all applications) should properly use background task assertions around file operations they require completed in a shared container (with or without extensions). This includes all writes or deletions. Such a process might still be killed by jetsam but at a much lower frequency.

Why We Created the Take Control Crash Course Series

Adam C. Engst:

We’re like you — we turn to the Web for answers first. But a lot of what’s on the Web is incomplete, unrelated, out of date, or flat-out wrong, whereas we work hard on accuracy and relevance in our books. We have to compete with all the content that’s already out there, but that’s hard if we’re not on the same playing field. So we’ve put the full text of each Crash Course on our Web site for search engines to index and for people to read […]

This may seem nuts, but people in the publishing industry also thought we were crazy back in 2003 when we refused to apply DRM to our books. What little copying there is hasn’t harmed our sales over the last 11 years, so with the Crash Courses, we’re going further and making them freely available on the Web. But, why would anyone buy such a book? Two reasons: first, we believe those who want offline access, better formatting, or more help than one chapter can provide will do the right thing and support our efforts, and those who needed only a quick answer wouldn’t have purchased anyway. Second, although the first chapter is easily read, we’ve slowed down navigating within the Web versions of books other than “Read Me First: A Take Control Crash Course,” so trying to read the entire book online would be unsatisfying.

Swift Retrospective

Ash Furrow:

We discovered, as I mentioned earlier, that Swift just isn’t ready for primetime yet. I want it to be, but it was probably a mistake to write the app in Swift. By our projections, it took us about four times longer than we had anticipated to complete the project (in terms of person-hours worked). A lot of that is admittedly due to our own faulty estimates, but a lot more of it is attributable to Swift’s immaturity. In future projects, we’re going to be more mindful about estimation.


So we’re pretty much stuck with Swift, as much as you can be “stuck” with a totally awesome language that just needs some more time to have a mature ecosystem of tools. Swift does, after all, address most of my concerns with Objective-C. It has a lot of features that made developing Eidolon a joy. I’m impressed with what Apple’s made so far, but I’m eagerly waiting for Xcode 6.2 and beyond.

Scaling Customer Service by Fixing Things Twice

Gareth Wilson:

We think that for each customer issue, we have to do two things:

  1. Solve the customer’s problem right away
  2. Find a way to stop that problem from happening again

How we solve the first depends on the specific problem at hand, but to resolve the second we use the 5 Whys method.


If you stick to Fixing Things Twice then over time all the common problems get resolved. This frees up your Customer Service team to look in to the unique issues that need more time.

I think this is the right way to do things and leads to a higher quality product. It’s incredibly satisfying to track down root causes. But you have to exercise some discretion because this is a hole with no bottom. At a certain point, you can do more good for more customers by not trying to second-fix issues of diminishing severity and popularity.

Browsing Versions of a File in Time Machine

Lukas Mathis:

In Time Machine, the selector for picking how far to get back is finicky, and hard to use. As far as I can tell, it’s impossible to know when specific files actually changed, unless you manually step through the history and check the file’s modification date. The UI doesn’t properly support what is probably the most common use case: getting back the most recent good version of a single file.


All I needed was for Time Machine to show me what versions of a specific file it had backed up, so that I could pick the one with the most recent modification date. Not any old version — the most recent version. But I can’t tell Time Machine to just show me what versions of a file it has. Instead, I’m (sluggishly, because Time Machine’s UI apparently requires more power than the most recent Tomb Raider) stepping back through Time Machine’s version history, painfully trying to figure out which specific instance of the files it shows me is the one that I need to recover.

tmutil looks very useful and can remove the Time Machine metadata that would ordinarily be messed up if you tried to manually restore from a snapshot. But it doesn’t seem to solve this particular problem. The easiest way I’ve seen is BackupLoupe, however even that will show you an entry for each snapshot containing the file, rather than each distinct version of the file.

Thursday, November 20, 2014

MPW’s About Box

John-Michael Bond:

The animation shows the imaginary building blocks of a 3 1/2" floppy disc flying together one-by-one from out of a box. When the pieces have finishing compiling an airbrush machine comes and paints the surface of the disc.

It’s a wonderful piece of animation, lovingly put together and hidden in a menu most users would never see. If you weren’t around for the original Mac OS, or just weren’t programing during those days, here’s your chance to see it.

Alas, the YouTube account has been terminated, but there is still a static screenshot.

Update (2014-11-21): @chucker found another copy of the video.

PCalc Piracy

Filip Truta interviews James Thomson:

You recently said on Twitter (I quote), “according to my stats, around 70% of the copies of PCalc on iOS are pirated.” That’s a staggering number! Especially for a calculator app. Why do you think this is happening? Could it be the $9.99 price tag?

It’s certainly higher than I thought it would be, but it’s certainly not unusual. I’ve heard of people who develop games who are seeing more like a 90% piracy rate! I think there are newer ways to pirate apps that don’t necessarily require a jailbroken phone, and there will always be people who don’t want to pay for things. PCalc has had a lot of positive publicity over the last few months, and I think that’s probably contributing to it getting pirated as well. I don’t think it’s down to the price though – people still pirate 99c apps.

But the other thing is, a 70% piracy rate doesn’t necessarily mean that I’m losing 70% of my sales. Most of those people wouldn’t have bought a copy in the first place, so while it still bothers me on an idealogical level, I am not too worried yet. But, if that number continues to rise over time, then I think it indicates a cause for concern.

With iOS so locked down, you’d think this would be a problem Apple could solve for non-jailbroken phones.

You Can Now Deregister iMessage

Apple (via Josh Centers):

You may need to turn off iMessage if you are now using a non-Apple phone and can’t get SMS or text messages someone sends you from an iPhone.


Update (2014-11-21): Jason Marr notes that deregistering does not fix the problem if people reply to old iMessage threads.

Friday, November 7, 2014

Tracking Down a WebKit Crasher

Daniel Jalkut:

I love it when customers take the time to write something about the circumstances surrounding a crash. Often even a little clue can be enough to lead to the unique series of steps that will ultimately reproduce the problem.


This is where the open-sourced nature of WebKit is both a blessing and a curse. If this issue had been revealed to exist somewhere deep within AppKit, or any of Apple’s other closed-source frameworks, I most certainly would have thrown up my arms, filed a bug, and hoped for the best. But Apple’s WebKit framework is something I can download, build, and debug. Sure, it takes nearly all day to build, and there is a steep learning curve to debugging it, but why did I become a software developer if I’m not up for a challenge?


To make a long, long, long, long, story very short: I used Instruments and its “pairing” functionality, which lets you hide balanced pairs of retain/release calls so that you are left with a more manageable subset of calls to examine and scrutinize. After scratching my head over this for hours and not making much headway, I finally came upon a specific call stack that had a very suspicious heritage. I confirmed through Instruments and then by direct examination of WebKit source code, that the WebView instance in question was in fact retaining and then autoreleasing itself as part of its dealloc method.

The Future of Unison

Cabel Sasser:

Unison’s end is bittersweet. The market for a Usenet client in 2014 isn’t exactly huge. But if you know Panic, you know we do our very best to never drop things awkwardly — we like to leave our apps in a good place for our (very) valued users.

So we’re excited to release a nice, final update to Unison.

c4 Compiler

Robert Swierczek has written a minimal C compiler in about 500 lines of code (via Michael Feathers).

Update (2014-11-21): Hacker News comments.

Fire in the Valley, Third Edition

The Pragmatic Bookshelf (Amazon):

This completely revised and expanded third edition brings the story to its completion, chronicling the end of the personal computer revolution and the beginning of the post-PC era. It covers the departure from the stage of major players with the deaths of Steve Jobs and Douglas Engelbart and the retirements of Bill Gates and Steve Ballmer; the shift away from the PC to the cloud and portable devices; and what the end of the PC era means for issues such as personal freedom and power, and open source vs. proprietary software.

The earlier edition that I read was good.


James Hamilton in 2009 (via Accidental Tech Podcast):

An excellent paper was just released that puts hard data behind this point and shows conclusively that ECC is absolutely needed. In DRAM Errors in the Wild: A Large Scale Field Study, Bianca Schroeder, Eduardo Pinheiro, and Wolf-Dietrich Weber show conclusively that you really do need ECC memory in server applications. Wolf was also an author of the excellent Power Provisioning in a Warehouse-Sized Computer that I mentioned in my blog post Slides From Conference on Innovative Data Systems Research where the authors described a technique to over-sub subscribe data center power.

I continue to believe that client systems should also be running ECC and strongly suspect that a great many kernel and device driver failures are actually the result of memory fault. We don’t have the data to prove it conclusively from a client population but I’ve long suspected that the single most effective way for Windows to reduce their blue screen rate would be to require ECC as a required feature for Windows Hardware Certification.

Monday, November 3, 2014

Android’s Audio Annoyances

Lukas Mathis:

For a long time, the main difference between Android and iOS was polish. Both systems offered roughly the same basic features, but iOS just did them better. Scrolling was smoother, the visual design was more consistent, the keyboard worked way better, and so on. While the difference is still there today, it is much less noticeable than it once was. But there are still pockets of awfulness in Android, and one of these pockets is how it deals with audio.

Sunday, November 2, 2014

CloudPull Removed From the Mac App Store

John Brayton (via John Gordon):

The most significant improvement in the CloudPull 2.6 update is Yosemite compatibility. I submitted this update to the Mac App Store on October 1. Apple rejected it on October 15. I spent time from October 15 through October 27 escalating the issue — first with the App Review Team, then with the App Review Board, and finally with Apple Developer Technical Support. Meanwhile, Yosemite was released on October 16 and many customers have already migrated to the version available on my web site.

It is possible to work around Apple’s reason for rejecting the app. Instead, I have decided to distribute CloudPull exclusively through my web site. That will allow me to provide updates more quickly, and to focus on serving customers rather than dealing with the Mac App Store.

The reason for the rejection was an OS bug that causes Core Data to open a compiled model file in read-write mode when it only needs read access. The .mom file is probably inside the app’s bundle, which is not a location that apps are supposed to be writing to. Lots of developers ran into problems like this when the Mac App Store was new. Apple seems to be using DTrace to audit what submitted apps are doing, but it still hasn’t audited its own APIs to make sure that they play by the rules.

It sounds like Brayton did everything by the book, but one month after submission his app was still in limbo when he pulled the plug on the Mac App Store version. This is the sort of Max Q issue that Rich Siegel was talking about last month. The Mac App Store is supposed to make it easier for customers to keep their apps up-to-date. In this case, it instead impeded the process of delivering a Yosemite compatibility update.

Saturday, November 1, 2014

The Point of Optionals

Sam Deane:

What it took me a while to get was that if we encounter an API or some source of objects that is giving us an optional X, we should probably want to turn it into a non-optional X as soon as we can. We want to push the “deal with the thing not existing” code out as far to the edges of our call graph as we can, and validate things as early as we can, and as close to the source of the objects as we can. This gives us more chance to deal with unexpected situations early before they become bad, and means that the bulk of the code doesn’t have to.

I think that the loss of the mental baggage in the rest of the code will actually be substantial in many cases, and will be a great aid to productivity (plus a small aid to efficiency).

Police Can Require Cellphone Fingerprint

Chuong H Nguyen (via Daniel Jalkut):

A Virginia Beach Circuit Court judge ruled that law enforcement officials can compel you to unlock your smartphone with a fingerprint, but that they can't force you to enter in your passcode or password to unlock your device. Judge Steven Frucci says that obtaining a fingerprint is like obtaining a DNA sample or a physical key, things that would have to be surrendered in an investigation anyways. Passcodes would be considered knowledge, and not a physical object, so they deserve more protection under the law.

Nick Heer:

A workaround for this, if you’re interested, is to simply shut off your iOS device before the police seize it; it will require the passcode when it wakes.

Thursday, October 30, 2014


Nate Cook:

Each packet of CMAccelerometerData includes an x, y, and z value -- each of these shows the amount of acceleration in Gs (where G is one unit of gravity) for that axis. That is, if your device were stationary and straight up in portrait orientation, it would have acceleration (0, -1, 0); laying flat on its back on the table would be (0, 0, -1); and tilted forty-five degrees to the right would be something like (0.707, -0.707, 0).

We’re calculating the rotation by computing the arctan2 of the x and y components from the accelerometer data, and then using that rotation in a CGAffineTransform. Our image should stay right-side up no matter how the phone is turned.

The results are not terribly satisfactory -- the image movement is jittery, and moving the device in space affects the accelerometer as much as or even more than rotating. These issues could be mitigated by sampling multiple readings and averaging them together, but instead let’s look at what happens when we involve the gyroscope.

Microsoft Band


Built-in GPS: Go running without your phone and still get your pace and distance data.


Battery life: 48 hours of normal use; advanced functionality like GPS use will impact battery performance

I wonder how many of the features work with iOS. It seems like integration would be difficult given what iPhone apps are allowed to do. I like the idea of GPS tracking without carrying a phone (unlike Apple Watch), but it doesn’t look like it can play music or podcasts. Only $199.

David Pierce:

Simply by virtue of being available to Android, iOS, and Windows Phone users all at once, Microsoft believes it can make inroads in an otherwise terribly siloed marketplace. Health will work with Android Wear watches, Android phones, and the iPhone 6’s motion processor, automatically collecting data from all three. Microsoft’s also been working with Jawbone, MapMyFitness, My Fitness Pal, and Runkeeper to import their data, and plans to incorporate many more.

Something only Microsoft can do?

Update (2014-11-07): David Smith:

The Microsoft band does an admirable job at what it tries to do. The data collection it does seems on par with other fitness trackers I’ve used. The physical design is utilitarian but acceptable. Its integration with my iPhone is basic but still useful. But it is a fundamentally restrained device. It sits right at the cusp of being truly transformative for my daily activities.

Capturing Phone Relay Audio

Paul Kafasis:

The combination of Yosemite and iOS 8.1 on the iPhone now offer a function called Phone Relay. Using Phone Relay, you can use your Mac to make and receive phone calls. That’s very handy on its own, but adding Audio Hijack Pro to the mix makes it even better. By setting FaceTime as the source in Audio Hijack Pro, you can record those calls for later reference!

Towards an Ideal OpenType User Interface

John Gruber:

What I find absurd is that you can use many of these features in TextEdit (Apple’s free text editor), but not in Pages (Apple’s purportedly professional word processor). They worked up through Pages ’09, but were sacrificed in the name of iOS and web app compatibility.

Wednesday, October 29, 2014

AppleScript and Yosemite

Ray Robertson:

Apple introduced a great variety of new automation features and updates in Yosemite. I’ve written up a quick summary below with links to more detailed information.

Daniel Jalkut:

Unfortunately the progress feature of AppleScript has not been exposed to 3rd party developers, so far as I can tell.

AppleScript Release Notes:

AppleScript/Objective-C is now available to all scripts, not just library scripts.

I’ve been wanting this feature for years. You no longer have to create a special AppleScriptObjC application; you can use it from any script. This will be useful both for the powerful Cocoa APIs as well as the many basic data structures and operations that were never part of AppleScript.

Here are some examples:

use framework "Foundation"

-- Calling an Objective-C class method:
get current application's NSDate's timeIntervalSinceReferenceDate()

-- Use pipes to avoid conflicts with AppleScript keywords.
get current application's NSDate's |date|'s timeIntervalSinceReferenceDate()

-- Basically, you just use “'s” in place of “.”.
set _array to current application's NSMutableArray's alloc()'s init()

-- “count” is also reserved.
get _array's |count|()

-- AppleScript changes “_array's addObject_(1)” to the interleaved syntax:
_array's addObject:1

-- AppleScript changes “_array's insertObject_atIndex_(0, 0)” to:
_array's insertObject:0 atIndex:0

set _string to _array's |description|()
set _appleScriptString to _string as Unicode text

set _data to _string's dataUsingEncoding:(current application's NSUTF8StringEncoding)
set _tildePath to current application's NSString's stringWithString:"~/Desktop/test"
set _path to _tildePath's stringByExpandingTildeInPath()
set {_ok, _error} to _data's writeToFile:_path options:0 |error|:(reference)
-- Should return “{1, missing value}”.
-- The file will contain “(0, 1)”.

Unfortunately, it looks like the technology is not yet very mature. Script Editor beach balled and had to be force-quit half a dozen times while I was writing this sample.

Update (2014-10-31): Joris Kluivers shows that developers can get at the progress of a script—via NSProgress.

Apple Features Then Forbids PCalc Widget

James Thomson:

Apple has told me that Notification Center widgets on iOS cannot perform any calculations, and the current PCalc widget must be removed.


I would be allowed to make a widget that let you to “enter a formula” but it couldn’t perform the calculation in the widget.


And yes, Apple is currently featuring PCalc in the “Great apps for iOS 8” section, under Notification Center widgets.

Jason Snell:

First there’s the maddening inconsistency: This is an app that was accepted into the App Store, and is even being featured in the App Store as I write this. And now, a few weeks in, someone at Apple has decided that the app is too... what? Too useful?

Then there’s the frustration about Apple reducing functionality. Why is doing basic math in a widget not okay, but running billing timers and calculating trip ETAs and any number of other tricky actions are fine? It can’t be the fact that it’s a widget that you interact with, because I’ve seen numerous widgets that allow you to tap and swipe and do all sorts of stuff.


Also, in the Yosemite version of Notification Center, Apple itself provides a calculator widget! So Notification Center can be used for different things on the Mac and on iOS? How does that make sense?

Federico Viticci:

Rather, what is disappointing is the persistence of contradicting signals from a company that many developers saw as “more open” after WWDC ’14. Developers like Thomson will keep finding themselves in the position of risking to implement a feature or create an app that may be approved, gain users, and be shut down by Apple for a sudden policy change.

Marco Arment:

Like the after-the-fact rejection of Launcher last month, this feels like the worst era of app review returning with a vengeance.

When decisions like this start happening, Apple needs to reevaluate the purpose of app review: to protect itself, its platform, and its customers from spam, fraud, abuse, and malware (and ensuring Apple gets its cut, which is reasonable).

David Barnard:

As I’ve mentioned in previous emails, I fear App Review. And that’s no small thing. So many decisions I make end up being filtered through whether or not I think something might get rejected. Which has a profound impact on my team’s entire development process — from what ideas we explore while brainstorming to how we implement specific features.

Nick Heer:

It’s not the rules themselves that are necessarily a burden on app developers. It’s Apple’s store, so they get to set the rules. But it’s seemingly-arbitrary stuff like this that makes developers lose sleep at night. Thomson clearly spent a great deal of time and care building this extension, and now that’s gone to waste with unfortunately characteristic indifference from Apple. And it’s not like PCalc was rejected outright — Apple allowed it in the store for the past month and a half before pulling it for violating a rule that doesn’t even exist.

Josh Centers:

I thoroughly read the Extensibility developer documentation while researching “iOS 8 Third-Party Keyboards Explained and Reviewed” (2 October 2014) and found nothing that would specifically bar a widget like PCalc’s. In fact, the developer documentation even hints that a graphics-intensive game might be allowable in the Today View, even if it’s not encouraged.

Update (2014-10-30): Sarah Perez:

But now we’re hearing that Apple is changing its course. The PCalc app and widget will remain in the App Store, and all calculator-type widgets will be allowed as well, an Apple spokesperson has confirmed to us.

From our understanding, the calculator use case was not one that Apple had anticipated, which is why an App Store reviewer originally explained to Thomson that he would need to adjust the app, or risk being pulled from the App Store.

It’s odd that Apple didn’t anticipate it considering that Yosemite includes Apple’s very own calculator widget.

Daniel Jalkut:

Incredible that TechCrunch was informed about PCalc’s widget being re-approved by Apple before its developer, @jamesthomson, was.

The core problem remains that App Review doesn’t follow the letter of its own written rules.

Gus Mueller:

I don’t have inside information, but I’m willing to bet that someone with veto power in Apple got a little upset or jealous about PCalc’s widget, and said “kill it”. James is lucky that he has lots of friends and folks who love PCalc, and also have a soapbox to stand on. So with the outcry and bad publicity, Apple changed it’s mind.

Tuesday, October 28, 2014

Yosemite’s Switch to Core Storage

Craig Cohen (via Clark Goble):

Yosemite uses a volume format known as Core Storage. It is the enabling technology behind Fusion Drive and FileVault.

Core Storage is a reliable, high-performance volume format. It provides increased crash protection, ditto blocks for metadata, copy-on-write B-tree catalogs, in-place transformations for backgrounding the disk encryption used by FileVault, and intelligent block-level data migration used by Fusion Drive.

Yosemite will auto-convert your drive so long as your Mac has hardware support for encryption. HFS+ is still there; it’s just wrapped in another layer.

1Password mini Shortcuts


What might seem like one of the smallest new features in 1Password 5 for Mac is actually one of its biggest. We completely redesigned it so you can find what you need more easily, but we also gave it a huge dose of keyboard shortcuts so you can work faster and keep important items at your fingertips.

Sunday, October 26, 2014

Yosemite Uploads Unsaved Documents and Recent Addresses to iCloud

Jeffrey Paul (via Rui Carmo):

Presumably to support Continuity, current document state is no longer only saved locally - those in-progress (not yet explicitly “saved”) documents live in iCloud Drive, so that they can be opened on other devices without ever having to hit “save”. This is useful, however, all of my previous open files have now been synchronized to Apple servers.


Apple has taken local files on my computer not stored in iCloud and silently and without my permission uploaded them to their servers - across all applications, Apple and otherwise.

I don’t think it’s at all obvious that the system would copy the Saved Application State folder to iCloud. Many of the applications don’t even have iOS counterparts. I have not tested this, but I’m guessing you could prevent this by unchecking “Allow Handoff between this Mac and your iCloud devices” in the General tab of System Preferences.


Check out ~/Library/Containers/ It would appear that iCloud is synchronizing all of the email addresses of people you correspond with, even for non-iCloud accounts, to their recent addresses service. This means that names and email addresses that are not in iCloud contacts, not synchronized to your device, and only available in an IMAP-accessed inbox are now being sent to Apple, silently.

I’m not sure how to turn that off.

Update (2014-10-26): Landon Fuller has a traffic log.

Thinking about this some more, I’m not sure that Paul is correct about the unsaved data being uploaded because of the new Continuity/Handoff feature in Yosemite. It think this is part of the older Documents in the Cloud feature, as mentioned by Dmitry in the comments. It looks like Handoff, as expected, uses a more direct method of transferring the files.

If that’s the case, the preference mentioned above is the wrong one. To turn off auto-uploading of unsaved data, you would need to uncheck the particular application in the iCloud Drive section of the iCloud tab of System Preferences. This would prevent you from using that application’s container (rather than the global iCloud Drive) with iCloud. In other words, I don’t think there’s a way to explicitly upload saved documents without having the system implicitly upload unsaved documents. Pre-Yosemite, there is no application-level control, so you would need to turn off Documents & Data entirely.

Regarding the e-mail address list, I found a disclosure on Mail’s help page:

If you use iCloud Contacts, your Previous Recipients list is available on your other Mac computers (with OS X v10.8 or later) and iOS devices (with iOS 6 or later) that have iCloud Contacts turned on.

So there does not seem to be a way to opt out of storing all your addresses unless you also opt out of syncing your address book with iCloud.

Update (2014-10-28): It looks like there is a way to save certain documents to iCloud without having new documents automatically auto-saved there. As Philippe notes in the comments, you can use the Lion-era NSDocumentSaveNewDocumentsToCloud hidden preference, which changes the default location for new documents:

defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false

In conclusion, I don’t think there’s anything new here with Yosemite. Apple seems to be providing the options that they should, although I would argue that the default behavior should be not to upload user data without asking. I think the main problem is that the OS doesn’t explain what it’s doing and, as a result, few people seem to understand how the iCloud features work and interact. The vast majority of users don’t know that when you click the box to enable iCloud—which you pretty much have to do these days—that this is one of the results.

Update (2014-11-06): Some readers coming from Macworld asked for a summary, i.e. which settings give which results. My advice:

  1. If you want every document to be saved (and auto-saved) to iCloud, use the default settings.
  2. If you never want any documents saved to iCloud, turn off iCloud Drive in System Preferences.
  3. If you want to use iCloud Drive, but only for those documents that you specifically choose to save there, to enter this command in Terminal:
    defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false

Saturday, October 25, 2014

Trust No One, Not Even Performance Counters

Paul Khuong (via David Smith):

I can guess why we observe this effect; it’s not like Intel is intentionally messing with us. mfence is a full pipeline flush: it slows code down because it waits for all in-flight instructions to complete their execution. Thus, while it’s flushing that slows us down, the profiling machinery will assign these cycles to any of the instructions that are being flushed. Locked instructions instead affect stores that are still queued. By forcing such stores to retire, locked instructions become responsible for the extra cycles and end up “paying” for writes that would have taken up time anyway.

Yosemite’s Mail Drop Considered Harmful

Dan Wood:

If Apple Mail detects a giant attachment, it will offer to send it via Mail Drop, which means that the file is uploaded separately to a temporary iCloud URL. It will stick around for 30 days.

The problem is that if you use this technique, it’s possible that any actual textual message might not be seen by the receiver of the email message.

If you send your email message as plain text — you might not even realize that you are sending a plain text message or a rich text message —or if the receiver’s email client shows them plain text instead of rich text — then ONLY the Mail Drop URL will be seen by the receiver. Not your important message.

Friday, October 24, 2014

Repurposing the Titanic

Justin Williams:

Building products with a bootstrapped mentality is completely different than a startup mentality. When bootstrapped, every decision you make affects the bottom line, and that is a bottom line you care about from day one. Trying to convert a platform that wasn’t designed with that in mind proved to be too great of a challenge for me as the sole proprietor of Glassboard. Rather than focusing on improving the core Glassboard product, I spent most of my time trying to cut costs where possible to curb our losses.

Alias Files and Bookmark Files

Daniel Jalkut:

The long and short of it is Apple has moved away from “alias files” in recent years, and now favors a format they call “bookmarks.” To users, the files behave the same way, and Apple continues to call them “aliases” e.g. in the Finder when it offers to make an alias to a file. However, the older system service for “resolving an alias file” does not work on bookmarks.


The problem was compounded at some point, maybe as recently as OS X Yosemite, when Apple started aggressively converting old alias files into bookmarks. So even if you had an old, functional alias to a folder in your script tree, it may have recently stopped working in FastScripts because Apple converted it … helpfully … to a bookmark.

The Race to Archive TwitPic

Pierre Chauvin (via Nick Heer):

Right now, a collective of Internet archivists and programmers is trying to do the impossible: save more than 800 million pictures uploaded to the Twitter photo-sharing service Twitpic before they disappear down the memory hole after the company’s scheduled shutdown on October 25.

Update (2014-10-29): Twitpic:

We weren’t able to find a way to keep Twitpic independent. However, I’m happy to announce that we have reached an agreement with Twitter to give them the Twitpic domain and photo archive, thus keeping the photos and links alive for the time being. Twitter shares our goal of protecting our users and this data. Also, since Twitpic’s user base consists of Twitter users, it makes sense to keep this data with Twitter.

Via Manton Reece:

This is much better than all those photos becoming broken links, but it’s still a sad statement on the Twitter ecosystem. Twitter threatened Twitpic, then Twitpic decided to shutdown, and in the end Twitter gets all the Twitpic assets anyway for cheap or no money at all. It’s a bizarre end to what only a couple years ago was a $3 million business.

Apple Maps Connect

Greg Sterling (comments):

This afternoon, Apple notified us of a new self-service portal to add or edit local business listings: Apple Maps Connect. It’s intended for small business owners or their authorized representatives (though not agencies) to be able to quickly and easily add content directly into Apple Maps.

The service is free and the listings (or corrected listings) appear on Apple Maps on the PC and in mobile. All users sign in with their Apple IDs and passwords.

I thought we’d see something like this about two years ago, but it’s good that it finally exists.

iTunes 12 MiniPlayer

Chris Johnson (via John Siracusa):

At first, I had no idea how you were supposed to invoke the Mini Player in Yosemite. The first thing I tried was green zoom icon, but that just made iTunes take up the full screen. After clicking on various things in the title bar area, I eventually tried and succeeded with the album artwork. I had mistakenly assumed that clicking the album artwork would give me a larger view of the album artwork.

In the Mini Player, I was similarly confused. Clicking the album artwork made the artwork bigger. Clicking the little double arrow icon was no help, it also makes the album artwork bigger. I’m not sure why Apple decided we needed two ways to see the larger album artwork. The × icon did the trick, but I was afraid to try it, thinking it would quit iTunes.

Update (2014-10-26): Kirk McElhearn:

When you click the close button, the behavior now depends on how you displayed the MiniPlayer. If you displayed it in a way that hid the main iTunes window, closing the MiniPlayer will bring back the iTunes window. If you displayed it and the iTunes window is still visible, then the MiniPlayer window will close, and nothing else will change. In other words, when you close the MiniPlayer, no matter what you do, the main iTunes window will show up again.