Archive for June 13, 2014

Friday, June 13, 2014

The Power of iOS 8

Ole Begemann:

Hereʼs why iOS 8 is a big deal. As an example, consider one of my favorite iOS apps, 1Password. Assume you want to sign in to a web site in Mobile Safari and your login credentials are stored in 1Password. This is a very common task that I perform several times a week. Think about the steps you have to go through today on iOS 7 to accomplish this[…]

Intents and Extensions

Dave Smith:

While iOS extensions are similarly considered components of a containing application (they are bundled together and cannot be deployed separately), their execution model is different than Android. iOS launches extension components into a separate (i.e. third) process from both the containing application and the calling application making the request (called the “host” by Apple).


Alongside an Intent’s destination definition (via an implicit action, explicit class name, etc.), the filter scope can further narrow by referencing a custom data type that is only known to a private suite of applications. Currently in iOS, NSExtensionItem data returned from the extension can provide unique type identifiers, but the same is not true for data passed forward to an extension; identifiers are inferred from the type of data passed in (rdar://17217209).

This is important because iOS, via the NSExtensionActivationRule in the Info.plist, determines when and where to show a custom action extension by comparing the input items passed to the UIActivityViewController with an NSPredicate. By limiting the scope of input items to standard data types, it becomes difficult to create more targeted actions that only respond to special data.

Hidden Changes to Supreme Court Opinions

Jeff John Roberts:

The issue, as Adam Liptak explained in the New York Times, is that original statements by the Justices about everything from EPA policy to American Jewish communities, are disappearing from decisions — and being replaced by new language that says something entirely different. As you can imagine, this is a problem for lawyers, scholars, journalists and everyone else who relies on Supreme Court opinions.

Until now, the only way to detect when a decision has been altered is a pain-staking comparison of earlier and later copies — provided, of course, that someone knew a decision had been changed in the first place. Thanks to a simple Twitter tool, the process may become much easier.

The End of Silos

Jean-Louis Gassée:

iOS applications have been freed from the rigid silos, the walls that have prevented them from talking to each other. Apple developers can now write extensions to their apps and avail themselves of the interprocess facilities that they expect from a 21st century OS.


Users of the word processor will be able to see and incorporate all files, regardless of how they were created or where they’re stored (within the obvious physical limits). This is a welcome change from today’s frustratingly constricted situation.

Federico Viticci:

To better understand the importance of these technological changes in iOS 8 and the inherent complexity that they’ll add for developers and users, I want to take a step back and contextualize how iOS currently handles file storage and management.

The Great C Runtime (CRT) Refactoring

James McNellis (via Hacker News):

For the past seven releases of Visual Studio (2002, 2003, 2005, 2008, 2010, 2012, and 2013), the Visual C++ libraries have been versioned and each versioned set of libraries is independent of other versioned sets of libraries. For example, a C++ program built with Visual C++ 2010 using the DLL runtime libraries will depend on msvcr100.dll and msvcp100.dll, while a C++ program built with Visual C++ 2013 will depend on msvcr120.dll and msvcp120.dll.


Starting with Visual Studio “14,” we will stop releasing new versions of the CRT with each release of Visual Studio. Whereas before we would have released msvcr140.dll in this forthcoming release, then msvcr150.dll in the next release, we will instead release one new CRT in Visual Studio “14” then update that version in-place in subsequent releases, maintaining backwards compatibility for existing programs.


The “best” example of this maintainability problem could be found in the old implementation of the printf family of functions. The CRT provides 142 different variations of printf, but most of the behavior is the same for all of the functions, so there are a set of common implementation functions that do the bulk of the work. These common implementation functions were all defined in output.c in the CRT sources(1). This 2,696 line file had 223 conditionally compiled regions of code (#ifdef, #else, etc.), over half of which were in a single 1,400 line function. This file was compiled 12 different ways to generate all of the common implementation functions. Even with the large number of tests that we have for these functions, the code was exceedingly brittle and difficult to modify.

iOS 8 Maps

Nick Heer:

Aside from the new indoor positioning site, indicating forthcoming indoor maps, and the improvements in China, Apple’s mapping data still feels like it hasn’t shaken its early reputation. Search still sucks, and my local data is sometimes still a crapshoot. Despite the enormous improvements throughout iOS 8, it’s (I think, understandably) frustrating to go yet another year without hearing about progress in the Maps department.

Ingrid Lunden (via Christian Zibreg):

“There were multiple improvements that didn’t make it into iOS8,” a source tells us.

Two years after parting company with Google, Apple is still trying to work out its killer Maps app.

Apple never reveals its plans ahead of announcing them, but a fairly detailed report published prior to the conference from 9to5Mac laid out what it claimed was Apple’s map news.

Key changes included enhanced, “more reliable” data; more points of interest and better labels to make certain locations like airports, highways and parks easier to find; a cleaner maps interface; and public transit directions — that is, providing people with data about nearby buses, subways and trains. Further ahead, the report noted plans to integrate augmented reality features to give people images of what was nearby.

Why didn’t they appear? One tipster says it was a personnel issue: “Many developers left the company, no map improvements planned for iOS 8 release were finished in time. Mostly it was failure of project managers and engineering project managers, tasks were very badly planned, developers had to switch multiple times from project to project.”

App Store Bundles as an Upgrade Path

I was not that happy to see App Store bundles announced, as it seemed like a way of driving app prices down even further. Instead of one app for 99 cents, you can get two or three. However, Michel Fortin suggests that bundles could also be used to implement upgrade pricing. Put the old and new versions of your app in the same bundle, and the App Store will discount the bundle based on what you already paid for the old version. You end up getting the new version at a discount.

LaunchBar 6

Objective Development:

This new version packs a lot of great new features, including a completely redesigned, themeable user interface, extensibility via custom, script–based actions, suggestions for Google and DuckDuckGo, live Calendar input feedback, new indexing rules like Emoji or Finder Tags, Info Browsing for accessing an item’s metadata and so much more.

LaunchBar has been one of my favorite apps for the entire Mac OS X era.

See also: Shawn Blanc, Adam C. Engst, David Sparks, and Kirk McElhearn.

Update (2014-07-06): There are also some great new features in 6.0.1 and 6.0.2.

Instantiating Classes by Name in Swift

Josh Smith:

In Objective-C that is easy as pie, just call NSClassFromString(aClassName) and then alloc/init the Class it returns. However, now that Swift is destined to become the lingua franca of iOS I decided to investigate how one might implement these reusable components in Swift. Instantiating classes by name turned out to be a stumbling block, as it appears that Swift does not yet support this.


I was able to get an object that represents a class (named AnyClass), but there was no way to get from there to a live instance of that class. So instead, I hopped into the parallel universe of Objective-C to create an object, which then gets returned back to Swift. This is why ObjectFactory can only work with NSObject subclasses; I’m relying on Objective-C to alloc/init a new object, and those methods are defined by NSObject.

I still think one of the less remarked on aspects of Swift is its lack of dynamism. It does not seem like Core Data, Scripting Bridge, or PyObjC could be written in Swift. Swift gives you a smarter compiler, but less flexibility at runtime. Swift is famously advertised as Objective-C without the C. Curt Clifton says:

Starting to fear that Swift is really Obj-C without the Smalltalk[…]

iOS 8 MAC Address Randomization

Frederic Jacobs, regarding an announcement in WWDC 2014 session 715, User Privacy on iOS and OS X (PDF):

iOS 8 randomises the MAC address while scanning for WiFi networks. Hoping that this becomes an industry standard.

Leo Mirani:

Whenever you walk around a major Western city with your phone’s Wi-Fi turned on, you are broadcasting your location to government agencies, marketing companies and location analytics firms.

In shopping malls, for instance, a firm called Euclid Analytics collects, in its own words, “the presence of the device, its signal strength, its manufacturer (Apple, Samsung, etc.), and a unique identifier known as its Media Access Control (MAC) address.” In London last year, one start-up installed a dozen recycling bins that sniffed MAC addresses from passers-by, effectively tracking people through the area via their phones. Such companies go to great lengths to explain that such information in not personally identifiable—except that repeated studies have shown that this data can indeed be used to infer a great deal about your life.

Lee Hutchinson:

In adding MAC address randomization during Wi-Fi probing, Apple manages to both eliminate a potential privacy leak and drive companies interested in location-based advertising toward a solution it prefers. iOS users who would prefer to opt out of iBeacon can first ensure they have no iBeacon-aware apps installed (like the official Apple Store app), or they can disable Bluetooth. Until iOS 8 arrives, iOS 7 users who would prefer not to have their MAC addresses tracked in public can disable Wi-Fi when they’re out and about.

Sam Oliver:

The new MAC randomization system is the latest in a line of privacy-focused moves from Apple that have come to light as developers digest the wealth of material offered at last week’s Worldwide Developers Conference.

Most visible among those change is iOS 8’s new “While Using” location privacy option. The new setting allows users to restrict apps from determining their location unless the app is in active use, preventing apps from collecting location data in the background unless explicitly authorized to do so.

I think this is a good idea, but I’m skeptical that it will do as much for privacy as people are saying. Julian Bhardwaj:

Most devices use both passive and active discovery in an attempt to connect to known/preferred networks. So it’s very likely that your smartphone is broadcasting the names (SSIDs) of your favourite networks for anyone to see.


The unfortunate news is there doesn’t appear to be an easy way to disable active wireless scanning on smartphones like Androids and iPhones.

However, you can at least tell your phone to ‘forget’ networks you no longer use to minimise the amount of data leakage.

In other words, with MAC address randomization, the names of your favorite networks become an identifier for you. Secondly, snoopers can use a common network name that your phone will try to auto-connect to, at which point they’ll get your real MAC address.