I Can Has Video

As you’ve probably noticed, movies rarely work in I Can Has Cheezburger app (as a work-around, you can open the web page and click the video to play it).

The reason it doesn’t work is the movie URL returned in the feed, which is something like http://www.youtube.com/v/cxLG2wtE7TM won’t work when passed directly to a UIWebView or sent to youtube to handle. If you look at the ICHC web page containing the video, you’ll see an embed tag containing that movie URL, which a webview is able to handle correctly.

I came up with a very simple way to make videos work reliably: I create a HTML string with an EMBED tag containing the movie URL. Instead of opening the movie URL directly using UIWebView loadRequest:, I open the HTML document I built with loadHTMLString:. You’ll now have a clickable movie thumbnail, which will open in the standard YouTube player without exiting the application.

Rewriting code without fear

Over the last few days, I’ve been rewriting some major pieces of ICanHasCheezburger.app to simplify and clean up the way I handle movies. Currently I use a single image view, which is set to a ‘play’ image for movies, which then open in the browser when clicked. I’m changing it to swap between the image view for displaying images and a web view in which I open movies.

In addition, I’ve cleaned up and simplified the way I deal with the RSS feeds I obtain the images from. Previously, I had a single FeedController class, which stored the entries obtained from a CXMLDocument as an array of CXMLNodes. To display an image, open the web page, or play a movie, I had to query the FeedController for an element of the current item.

To clean it up, my FeedController now uses an array of FeedItem objects, with properties such as permalink, image URL, movie URL, and title. I now pass a FeedItem to my root view, which uses it to decide whether to display an image or movie without having to go back and query the FeedController.

I found it to be a lot easier & cleaner to use NSXMLParser, so I can create a FeedItem for each RSS item directly rather than have to manipulate the CXMLDocument, extract each CXMLNode, and create a FeedItem for it.

Until now I’ve never used XCode’s Snapshot feature. Since I use Subversion, I figured I could simply check out an earlier revision. Before I started rewriting all of that code, I saved a snapshot. It shows exactly what has changed since the snapshot and makes it very easy to revert if something goes wrong. It’s very similar to checking in to Subversion or reverting to an earlier revision, but it’s a lot faster and more convenient. I find it very liberating to be able to make a major change like this and not have to worry about messing up, since I can easily go back to the way it was.

Snapshots

153 years 26 days 20 hours

iPhone application usage stats show that many apps are used only a few times and are then forgotten. According to Pinch Media, only about 20% of users return to use a free app the day after they first download it, and after 30 days, less than 5% are still using it.

I Can Has Cheezburger doesn’t seem to be following those trends. These stats only include version 1.1 and later, since 1.0 didn’t include Pinch Analytics. We’ve had a total of over 5 million sessions totaling more than 153 years. That works out to an average of 13 minutes per session.

ICHC Lifetime stats

Our usage seems to show no sign of tapering off. This month so far we’ve seen over 22,000 first time users for a total of over 1 million sessions totaling over 26 years cumulative time for all users.

ICHC Month Stats

I Can Has Cheezburger is a very “sticky” app that people keep coming back to and spend a lot of time in, so it would be very successful as an ad-supported app. Ben & I have been talking to a mobile advertising company about putting ads in the application. Some people will probably complain about it, but this is too profitable for us to pass up.

I can has an API

I’ve finally had a chance to get back to work on I Can Has Cheezburger and I’ve now implemented the Cheezburger API for submitting LOLs to the site. Here is the very first LOL created from the app.

I’m still not satisfied with the submission window, which I think looks too cluttered. I haven’t decided where to add a login button, so it currently sends all LOLs anonymously.

I’ve also added a work-around for the problem with playing videos for this update, which I’ll most likely submit in the next week. I’ve kept the old user interface for this version rather than the navigation-based interface I’m working on.

I Can Has Cheezburger App Redesign

I have been working on implementing the new Cheezburger API in the ICHC app, but I’m starting to become unhappy with the user interface. In particular, the bottom toolbar is too cluttered and I don’t really like the action sheet I use for creating LOLs.

I’ve started redesigning it to use a navigation based user interface, where the top level lists the sites, and each site opens a view similar to the current app. Like the current version, you’ll be able to swipe back & forth or use arrow buttons to switch images and tap to toggle the toolbars on or off. When the application starts up, it will go directly to the last site viewed rather than the top level. Unlike the current version, it will save the last image viewed for each site.

Before I commit to this, I’d like some feedback.

This is the top level view, where you choose the site:

iPhone Simulator-3.jpg

This is the image view (still not complete):

iPhone Simulator-2.jpg

free polls Which user interface do you prefer?
Current – 1 screen & Action sheets
Navigation Controller


I can (almost) haz an update

I have an update to ICanHasCheezburger almost ready to go, but I’m waiting for a server side feature before I can release it. I was going to try to release it before Christmas, but Apple says the approval process is backlogged and new submissions most likely won’t be ready before Christmas. Instead, I’m trying for Macworld week now.

Highlights of version 1.1:

  • Pinch Zoom support. You can now use a pinch gesture to resize pictures. Swiping to go to next or previous image is now only allowed when the image is not resized. You can double-click a zoomed image to restore it to normal size.
  • Create your own LOLz with a picture from the camera or a saved picture. Unfortunately the server API for submitting images isn’t available yet, so for now it will just be saved to the camera roll.
  • Recognizes movies contained in the feed and will attempt to open them in YouTube, but unfortunately many of the movies won’t play on an iPhone.
  • Application always starts up with the last viewed image from the previous session rather than the first image.