Mild-Mannered Canadian Fury

Doug Stephen is Politely Peeved

Remote View Controllers in iOS 6

Mon, 01 Oct 2012 Ā«permalinkĀ»

The source link is a little technical if you don’t know much about Cocoa, UIKit, and Objective-C, but the implications are interesting. Could possibly be the beginning of inter-app communication on iOS.

Noted developer in the iOS jailbreak community Grant Paul retweeted a link to a post by iOS dev Ole Begemann discussing a new private framework in iOS 6 that allows for disparate processes to talk to each other.

Through some clever reverse engineering, Ole discovers that many of the built-in Sharing features now invoke communication between new processes instead of loading up pre-configured views in an existing process; for example, when you hit the button to e-mail something from within an App, instead of the slide-up mail composition sheet being part of your existing app, a separate program starts running and “injects” its display and behavior in to your app, using something being called a Remote View as an intermediary.

The Remote View lives inside of your app, and acts as sort of a canvas for the external process to draw on. Your app interacts with the Remote View and not with the external process itself; the inner secret sauce and machinations of the Remote View are completely controlled by the OS, and the Remote View facilitates the transference of information in a way that is secure and plays well with the app sandbox. It’s part of the XPC frameworks that Apple introduced in OS X Lion.

Now, the frameworks being utilized by the iOS 6 Share services are private, which means that even with all of this clever reverse engineering, if anyone were to utilize them in their application then the app would get rejected by the reviewers. And there is no real evidence that Apple is going to ever make these API’s public for developers. But the fact that the Share sheet services are already utilizing this communication model is promising, since that would be the logical place for user-defined App handlers to register themselves.

We can dream.