Apple TV: A World Without Webviews

Daniel Pasco
Sep 11, 2015 · 5 min read

The new Apple TV’s operating system, tvOS , has some differences from iOS 9, but one of the most startling ones is the removal of support for webviews. These are used throughout the industry for a wide range of purposes, the most obvious of which is to display a website from within your app.

Our Friend, the Webview …

… Is MIA

Even though the classes exist to fetch a page from a remote site, nothing else is really there — the content has to be parsed, the DOM has to be built, the actual HTML has to be rendered and styled, and any embedded Javascript has to be run.

There’s no mechanism for doing any of these things or presenting the Web page to the users.

OK, so what does that mean?

No Internet Browsing

That kind of functionality won’t be happening here.

A Lot of Broken Applications and a Lot of New Code

The thing about a webview is that although it’s not as good as a native view, it can still be pretty darn good. If you’re a big company trying to roll out apps for iOS, Android, and the desktop browser, you’re going to have three different teams belting out code like crazy for each platform.

Taking a select subset of your app’s views and making them webviews lets you cheat a little. You have a sports company that’s rolling out dedicated apps for each platform, but the batter’s box you show in all of them is actually an embedded Web page. Or you have a social networking app, and the user registration page is an embedded Web page.

Goodbye, OAuth (woah). For now, anyway.

Or you have some content that may have to be changed on the fly, like a concert schedule. Just make it an HTML file you can update and all the sites will grab it and show it when the user wants to check the schedule out.

Webviews make showing content that doesn’t have to look native pretty easy to do, and you only have to do it once and make sure that it renders correctly on all three of your platforms. This can simplify a lot of tricky situations and reduce your costs when you can use them.

For a lot of companies, the absence of webview support on tvOS is going to be painful. It’s going to require custom rewrites of those web-based widgets and views in either native code or TVML, just to support the Apple TV.

In some apps, webviews show up a lot, so this is a huge amount of special case content just to get on the platform. That’s going to make it expensive, in terms of time, level of effort, and money.

No Web Apps

Why Would Apple Do This?

Control of the user experience would be a huge reason. A gigantic 1080p, non-Retina screen is not going to render Web content well, and Mobile Safari also depends on a large number of gestures (pinch zoom, tapping to zoom in a div, etc.) that simply are not available on the platform.

For another thing, many “native” apps are simply wrappers around Web content, which tend to be a poor overall experience compared to true native apps. This decisively puts an end to those and ensures that any new apps will be more in keeping with the Apple ecosystem. And native apps might endure tvOS updates more gracefully than Web content decoupled from the current platform version.

From a security standpoint, it makes a lot of sense to very much restrict the ecosystem in a way that especially eliminates Web exploitability, which these days always seems to be the weakest link. That’s not to say that it’s not exploitable, but this move at least severs ties with a major security risk.

Result

But the industry is going to be very, very busy for a while making the changes needed to support this new platform.

Companies hoping to leverage a universal HTML5/CSS/JS-based UI for multiple platforms may no longer find this option viable. They will need to rethink their strategy for providing a cohesive branded experience on multiple platforms while still writing native apps for those platforms. That’s not to say that someone wouldn’t be able to try compiling WebKit and creating their own view within to render HTML. Certainly there are companies with the manpower and resources to do this. I’m not certain those apps wouldn’t get rejected, though.

One way or another, it’s an exciting time. I’m looking forward to what’s ahead for all of us.

Follow Black Pixel on Twitter and Instagram.

BPXL Craft

Design and technology articles from the Black Pixel team.

BPXL Craft

Design and technology articles from the Black Pixel team. blackpixel.com

Daniel Pasco

Written by

Renegade polymath, guitarist, semi-retired mad scientist. Was: Founder and CEO of Black Pixel, Engineering Director at Hypergiant. Now:Senior Engineer at Apple.

BPXL Craft

Design and technology articles from the Black Pixel team. blackpixel.com