Since building Fetch, the thing I wanted most was improved AirPlay support. Apple did even better than that though an enabled developers to natively build apps using TVML or UIKit for the new Apple TV.
From iOS → tvOS
Fetch was a pre-existing app for both iPhone and iPad so moving things like the pre-existing PutioKit that connected to and mapped the Put.io API was easy. The trickiest part of porting to the Apple TV was figuring out what the interface was going to be.
Interacting with an iPhone is a solitary, intimate experience. Small UI elements that can't be seen from a distance are used and the device is used alone. A TV is different. It's the central point in most living rooms and choosing something to watch is often something you do together.
I can't count the number of times I've flicked through Netflix looking for something to watch with my boyfriend.
Tackling OAuth Login
Login proved to be a challenge. The Put.io API uses a standard OAuth login flow that requires a web browser or web view. Apple (rightly, in my opinion), didn't include WebKit as a public API in tvOS so we had to introduce a workaround.
Here's what we came up with as the completed login flow. The QR code can be scanned from the iOS app or login can be completed from a browser on a secondary device such as a phone, iPad or laptop.
Consumption vs. Management
The iOS app allows for management of most aspects of Put.io. You can add/delete new transfers. Move, rename, delete and search files. Oh, and you can interact with most file types including video, photos, audio and text files.
The TV app had to be much simpler than that and would need to focus on consumption of content. Due to time constraints, v1 of the app only allows for the viewing of video but ultimately will allow access to images and audio too.
Because of this I knew I didn't want the app to be a big list of files in a standard
UITableView. That works on the iPhone but it doesn't translate well to a screen that's sitting the other side of the room from you. It works but there had to be a more elegant solution.
Collection views seemed like the obvious choice to make the UI image centric. Put.io's API returns a screenshot of each video so I quickly knocked something together.
Not perfect but in my opinion, more visually appealing than just a table.
I'd got this far without a Dev Kit and was under the impression I wasn't gonna get one. That was until Apple sent me this lovely email…
Once I got the kit, I was happy with what I'd done but felt it could be better. I wanted to be able to match up files to metadata and artwork to make it feel more friendly.
I created a framework called Downpour — that'll I'll open source when I get a chance to clean it up — to get names of shows, movies, years, season numbers and episode numbers from filenames. With the help of the amazing TMDb API I could pull out all kinds of info like title, description, artwork etc.
After completely re-working the UI, here's what v1.0 of Fetch TV looks like!
It's just been approved and will be on-sale from Friday! 😊
1. How much will Fetch TV cost?
Fetch will be completely free for anyone that's already purchased the iOS app. We're using the "Universal Purchase" which means one purchase for multiple devices.
We will however be increasing the price of Fetch to £2.99 for new customers. We put a lot of work into the app and hope it will be appreciated.
2. Will Fetch work on the current Apple TV?
Sadly not, it'll only be available for the new Apple TV as Apple haven't extended the new tvOS for older models.
3. Do you look through all my files to fetch the metadata?
We only match the file names on the device. Nothing but the login is passed through our server at all.
4. I don't care about cover art, can I turn that off?
Yep! If you don't like or want the metadata and posters then there's a option in the settings to turn it off completely.
5. Are subtitles supported?
Any video that currently supports subtitles on iOS will support subtitles on tvOS.
6. Will the new UI be coming to iPhone and iPad?
If it proves to be popular we will look at moving this over to the iPhone and iPad.