I’m a podcast fanatic. For the past few years podcasts have filled hours of my day whether commuting, at work, at home, or while exercising. One of my favorite network of podcasts is the SModCo network by Clerks director Kevin Smith. After listening to his podcasts on my iPod Touch for a year I received a decent Android phone and immediately began searching for a great SmodCo specific podcast app. I stumbled across an app named Smod Forever and it was decent. However, eventually the developer introduced abtrusive poorly coded advertisements and I had to give it up.
No more than 2 months after abandoning Smod Forever, a company introduced an application for Kevin Smith’s podcast that is a re-skinned version of their Nerdist and the Joe Rogan Experience apps (Nerdist and Joe Rogan Experience are other popular podcasts). While the apps seemed better than the Smod Forever, I decided to try a general Podcast app that was highly rated – Doggcatcher.
Unfortunately, I’ve had a host of problems with Doggcatcher.
- It’s really slow for my Samsung Galaxy Nexus
- Syncing often fails
- Sometimes Episodes are swapped
- The design is cluttered
- Error catching is non-existant
Recently, my frustration reached its height and I decided it was time to write my own app.
For the past two years I’ve dabbled with Android development. I like to think I know the platform very well, but due to my own shortcomings:
- Poor planning
- Feature Happy
I’ve never published an application to Google’s Play Store. I figured that creating an app I would use daily for a personality that I admire would be a damn good way to motivate myself. I’d also learned from previous projects to boil the initial implementation to a few tasks and to do them well. So I came up the following requirements for Phase 1 of my Smodcast Android App:
- Adhere to current Android Design Patterns
- Display list of Smodcast Episodes
- Bottom fragment with Play / Pause functionality and currently playing label
- At first only stream mp3 via HTTP
However, my interests combined with a switch in projects at work has led me to…
iOS – The Promised Land?
I ended up working in iOS this past week at work. I know nothing of iOS aside from general principles and the syntax of Objective-C is still pretty much an unknown world to me. But I decided that it was time to take a deep-dive into XCode, Objective-C, and iOS development so that I knew what the hell I was doing both at home and at work.
During my break on Monday I spent began researching what I’d need to develop my Smodcast app on iOS. I boiled it down to the following:
- XML Parser (preferably SAX)
- List view to display the episodes
- Bottom view for currently playing text and Play / Pause button
- Audio API
Started developing the iOS version of Smodr by looking up a simple RSS reader tutorial. Using that project as a base, I implemented my own Episode object versus a dictionary implementation. The list of episode was easily completed so I moved to implementing the bottom currently playing view I envisioned (borrowing heavily from Spotify’s iOS app). A few Google searches later I ended up on a StackOverflow thread recommending enabling the bottom toolbar property in the Navigation Controller. I quickly toggled the appropriate property, ran my application and saw my list of episodes with a bottom toolbar resembling an empty canvas. My work on Day 1 was complete.
I’m about 50% done with the rough phase 1 implementation. Today I focused on audio playback in iOS. I was led to two APIs, AVAudioPlayer and MPMusicPlayerController but since I was planning on HTTP streaming for this proof-of-concept stage and MPMusicPlayerController only allows access to the iPod media collection, I chose AVAudioPlayer. Within a few minutes was able to initialize the correct media file off of the table cell selection and invoke my audio player. My next job was to create two items on the bottom toolbar I created the night before. Populating the bottom toolbar was the timesink for the second night, but eventually I was able to right align a UIBarButtonItem with the system included Play icon and respond to taps. I wrote a simple conditional checking the rate of playback to see if audio was playing then resumed or paused playback. I was satisfied and hit the sack.
The next day I continued with the bottom toolbar by including a UIButtonBarItem that includes a UILabel denoting the current episode or an empty string if nothing is playing. Although I had to handle the label overflow, I switched back to the playback button. I wanted to toggle state between play and pause depending on either the player’s rate property or a boolean value. The switching of images proved to be the biggest time sink due to my unfamiliarity with the iOS UI structure and my sleep deprivation. A few StackOverflow threads recommended not using the provided play and pause buttons and instead suggested to swap the image. I grabbed a play and pause png using iconfinder, initialized the UIImages, but was unable to change the button’s image. Frustrated, I went to sleep. The next morning I immediately fired-up my laptop and gave it another try. After a full night’s rest I realized that I was setting the image property of the UIBarButtonItem instead of the UIBarButton. I quickly deleted the few unwanted characters and rebuilt the application. Just like magic I was pausing / playing the audio and showing the appropriate button images. Win! Here’s a snapshot of the app in its current state:
So far iOS has been a joy to work with. I’m well aware that all I have in this initial phase is an app that’s barely usable outside of the simulator due to:
- Lack of storage
- HTTP streaming
- Battery life
- Network requests and connectivity
- Data usage
But I’ve finally got the basic functionality down and started implementing the more advanced features today. And unlike usual, I’m still having a great time developing. My biggest puzzle if I’m not sure why I’m making so much progress in such a short amount of time… I’ve narrowed it down to a combination of the following:
- This new environment, language, opportunity has excited and motivated me
- I’ve grown as a developer and my skillset has improved since I last attempted a mobile app
- The iOS framework is well designed.
- XCode feels like THE complete package IDE. I’ve just felt extremely comfortable with it.
- Tutorials and StackOverflow answers are of higher quality than other platforms
- I finally “get it” when it comes to the architecture of mobile apps
However, what I do know for sure is that I’m really enjoying myself and love seeing progress every day. I’m totally amazed at the amount of work I’ve done without being completely comfortable with the syntax of the language and Apple’s APIs. So if anyone has been on the fence, I say “Go for it!”. You may very well surprise yourself like I did. Now back to coding so that I can finally ship quality software!