I’ve spent part of my development schedule over the last few months rebuilding the iPhone app for NYC based startup Clean Plates. The Clean Plates iPhone app v2 is now available on the app store so check it out. Clean Plates offers professional restaurant reviews and a series of email newsletters with a healthy eating focus. The app allows users to search nearby or by neighborhood to find restaurants (think Yelp’s app but with more advanced filtering options and only professional reviews).
From a development perspective it was an interesting project in one way in particular: it was a brand new re-write of an existing app. Why re-write instead of extending the existing code base? Read on…
The old app was originally built several years ago and consisted of 475 classes and 79,889 lines of code. If that sounds like a lot of code that’s probably because it is. Because of it’s age there was no use of Storyboards and art assets were fixed in size (no Auto Layout). Combine this with poor performance, frequent crashes and heavy usage of an old un-upgradable version of RestKit and you have a perfect case for a brand new build.
The new app uses Storyboards and Auto Layout so it is compatible with the newer, larger iPhone models. It has been redesigned to be more in line with iOS 7+ style guides and even has more advanced features, including better restaurant filtering and the ability to save favorite restaurants. It is also only has 52 classes and 6,910 lines of code. With the new updates I tried to not to leave any existing users behind so it is still compatible with iOS 7.1+ devices, including hardware compatibility with the iPhone 4 and it’s shorter form factor. Finally, there are no major dependencies on third party libraries such as RestKit so future upgrades should be relatively smooth. The app is not perfect and at least one update will be needed for minor improvements but I consider everything here a big win.
Wikipedia Article Search is a new repository I have added to my GitHub account. This iPhone app searches Wikipedia for relevant articles and then displays those articles upon user selection. The app consists of two screens: one with a search box and table view to show results and then next to show the article’s webpage upon selecting it from the table view.
This app use the Wikipedia API to perform article searches. In future versions I hope to include logic to query DBPedia and Freebase to show how you can use these databases to get additional data about an article. I may also convert the NSURLRequest and NSXMLParser logic into RestKit or AFNetworking code. For now, it’s a nice simple app to get any developer started working with Wikipedia in iOS.
Here is a look:
Swift is Apple’s new programming language for iOS and OS X. Swift had been in development for four years before being unveiled by Apple earlier this year. For now Swift can be used alongside Objective-C for existing or new applications though it is expected to entirely replace Objective-C eventually. Swift has a few new features not available in Objective-C, such as Tuples, but the key selling point of the language is that it is easier to learn and read in comparison to Objective-C. Objective-C should remain the more popular language for iOS and OS X programming for several years to come.
As a curious programmer that already works with far too many languages I decided to take the dive and learn the basics of the Swift programming language. After going through some documentation and tutorials in general I think Swift is a cool language with a lot of potential. With that being said, for the majority of my iOS projects I am leaning towards sticking with Objective-C for now. After talking with other programmers, most agree that new programmers should learn Objective-C first and then eventually Swift.
Here is a list of resources that I am going through to learn Swift. These are mostly from the website RayWenderlich.com, which has been a fantastic resource for iOS developers for years. This should be enough to cover the basics of Swift for any level programmer.
GitHub is a website that has been around since 2008 and in the last few years has become a major part of the software development community. GitHub serves as a Git repository (a popular source control application) coupled with a web hosting service. I have been using GitHub to collaborate on private projects for several years now and in that time I have also used lots of GitHub hosted projects to help me build some fun and interesting websites and apps. I thought it was high time that I start giving back to the developer community and so I’ve begun the process of publishing example applications based on some of my work on GitHub.
For my first GitHub repository I have created the iPhone App TextToSpeech. TextToSpeech is a single view application that shows off some of the text to speech features that were first introduced in the iOS 7 SDK. You type in text in a textbox, select a voice type, speed, pitch and pause cutoff type and then play and stop playback of the text translated to voice. The app also registers itself to play speech when the app is running the background with full audio control capability. There are a number of bugs in the official Apple SDKs surrounding text to speech so this project includes several workarounds that may be useful to developers diving into this stuff for the first time. Here’s a quick look at the app:
Get the TextToSpeech project from GitHub