Archive for July 30, 2015

Thursday, July 30, 2015

Disabling Versions and Reclaiming Space

I have been having problems with the system Versions feature. On one volume, nearly half the total space is consumed by the versions database. I think it’s supposed to automatically prune old versions if more space is needed, but it doesn’t, so I instead get errors from MoneyWell that it can’t save its database.

The versions database is managed by revisiond, but as far as I can tell there are no built-in tools for controlling it. The only way to manually reclaim space seems to be to delete the .DocumentRevisions-V100 folder, which will delete all the versions.

I would like to selectively disable the Versions feature for certain volumes, but there doesn’t seem to be a way to do that. As far as I can tell, there isn’t even an official switch to disable it entirely. This answer suggests checking “Ask to keep changes when closing documents,” but that doesn’t work. This answer says that you can set the ApplePersistence default in Terminal. At least that works on a per-app basis, because it can also make some apps like TextEdit not function properly.

But the bottom line is that I wouldn’t have a problem with Versions if it would automatically compact its database.

Update (2015-07-30): Here is John Siracusa’s discussion of the versions (a.k.a. document revisions) feature.



Dixie is an open source Objective-C testing framework for altering object behaviours. Test your app through creating chaos in the inner systems. The primary goal of Dixie is to provide a set of tools, which the developers can test their code with. Behind the goal is the ideology of “do not always expect the best”. You can read more about this here.

Via iOS Dev Weekly:

I found that the best way to think about Dixie was to see it as like a mocking framework that you enable globally inside your app rather than only in your test target. This allows various parts of your app to be replaced for integration tests, amongst other things.

How GameplayKit AI Works

Paul Hudson:

Amongst the many features introduced in GameplayKit, one of the most immediately useful is its ability to provide artificial intelligence that can evaluate a situation and make smart choices. We’re going to be using it in our Four in a Row game to provide a meaningful opponent, but first it’s essential that you understand how GameplayKit tackles the AI problem because it directly affects the code we’ll write.


GameplayKit’s artificial intelligence works through brute force: it tries every possible move, then tries every possible follow-on move, then every possible follow-on follow-on move, etc. This runs up combinations extremely quickly, particularly when you consider that there are 4,531,985,219,092 unique positions for all the pieces on the board! So, you will inevitably limit the depth of the search to provide just enough intelligence to be interesting.

UIKonf 2015 Videos

Apple’s Plan for More Connected Apps

Federico Viticci:

At WWDC 2015, Apple announced app search, a new feature of iOS 9 that will help users find content inside apps. Beyond the user-facing aspects of a new search page on iOS and proactive suggestions from Siri, however, lies a commitment to fundamentally rethink iOS’ relationship with apps and the web, with deep implications for the future.


With local app search, iOS 9 can build an index of content, app features, and activities that users may want to get back to with a search query. Built like a database and already in use by Apple apps such as Mail and Reminders, CoreSpotlight will provide low level access to the index of an iOS device, making it easy to organize and retrieve content users have previously seen, created, or curated.


The way Apple has designed local app search is reminiscent of viewing history in web browsers: users want to be able to find things they’ve seen in the past; from this standpoint, local app search will be more akin to a local app history, enabling users to find apps, but also files, pages, profiles, likes, comments, and other types of previously seen content.


Apple is building a cloud index of user activities and web content. As the company describes it, the cloud index will “inform any searches by any user of your app on any device”, and it’s broadly aimed at creating a public and anonymous index of what users look for and engage with. Part web crawling and part a crowdsourced search database, Apple’s cloud index will be closely tied to apps and results from it will be displayed in the search page of iOS 9.


Developers have choice when it comes to the cloud index. In an iOS app, they can tag user activities as public, and public activities get sent to Apple's cloud index as anonymous hashes.

It’s interesting that CoreSpotlight does not seem to require creating lots of stub files like Spotlight on the Mac.