After my first foray into Cocoa development, which involved Radio, I decided to take what I had learnt and move into TV. Tellybox is the result. It’s a Cocoa desktop app that’s a wrapper for the BBC iPlayer live and catchup service for a day. I’m quite pleased with how it turned out.
[BY THE WAY] This is a personal learning project, and not affiliated with the BBC in any way. It (and I) only use publicly available information, in order to try and inspire people to just build cool stuff. If you think you could do better or have ideas in improving the app, please let me know. I’d love to hear from you.
Below I’ve briefly noted the various features, and what areas of Cocoa I had to learn to implement them. I ‘ve added a long list of resources at the bottom, which have and continue to, prove very useful when developing in Cocoa.
1. Select your Favourite Station – You can select which channel you’d like to watch from the Watch menu. This involves reading in some .plist configuration data and displaying it in an NSMenu. The menu is drawn with code, and once understood, meant building and manipulating all the other menus was a breeze.
2. Choose your viewing size – You can choose from a list of 5 sizes to view from. These sizes can be chosen from the View menu or the shortcuts 1-5. This sizes as well as the location of the display window are remembered when you quit the application. The resizing is using NSWindows setFrame:display:animate: to make it look pretty and is using NSUserdefaults to manage the remembering of the size and origin of the window.
3. The day schedule – Here you get a list of what’s on the day you are watching, and what is available to watch again. It also marks where you are in that day. I still need to work on updating this schedules as currently it only loads when you first start viewing, so won’t change automatically over time. The schedule data comes from BBC Programmes via XML and is parsed using NSXMLDocument. It uses the same caching policy as the BBC site.
4. Growl Support – The app has Growl Notification support. If you have growl installed you will get notifications about what you’re watching. This was implemented with the growl documentation and uses the Growl Application Bridge.
5. Preferences – You can change a few preferences at the moment. One is the default Network that gets shown when you start the application. The other is whether you would like to receive automatic updates and how often you would like to check whether they’re available. The former uses NSUserdefaults and Cocoa Bindings. The latter uses the popular and amazing Sparkle update framework.
Here’s a list of useful resources I’ve used to get to this point:
- Cocoa Central
- Cocoa Dev
- Cocoa-dev mailing list
- Kati Dev
- Cocoa Programming for Mac OS X essential!!
- Programming in Objective C
- DMG Canvas
Finally a few things that don’t work so well. Well one at the moment really, and that’s guidance. I haven’t quite worked out how to get the iPlayer guidance stuff working in Tellybox, which means if the show you want to watch again has a guidance rating then the only way you can watch it, is to go to the web version. I’ll keep trying though.
I think that’s it. Hope you like it. I’m really enjoying Cocoa development at the moment and look forward to my next personal project.