How to Get Back the iOS 6 SDK After Upgrading to Xcode 5

iOS 7 finally launched on September 18, and with it, the public release of Xcode 5. However, after upgrading you will notice that you can no longer compile using the iOS 6.1 base SDK. This is a problem for any app that isn’t yet compatible with the iOS 7 SDK. To see what SDK’s you have installed, open the Terminal app on your Mac and enter:

ls /Applications/

If you only see the iOS7 SDK folder listed, you will need to extract the iOS6 SDK folder from an old copy of Xcode 4.6. Or you can just download it here. Copy your extracted iPhoneOS6.1.sdk folder into the folder shown above. Shut down and restart Xcode. You will then be able to select from both SDK’s when building or running.

If you just need to download the iOS 6 simulator, open Xcode and go to Xcode > Preferences > Downloads.

Editable UITableViewController


A common use case in iOS is creating a form or an editable list of records directly inside a UITableView. We could send the user to a separate “detail” view controller for editing, but that complicates and slows down the user experience. In this post, I’ll show you how to create your own subclass of UITableViewController that can support any number of UITextFields inside your table cells and use them to update any backing data source. This code can then be reused in any project that needs an editable table view!

Continue reading

Why NSNotificationCenter is Bad


A lot of talk about good coding practices centers around the idea of loose coupling. That is, writing classes that interact based on behavior, not by identity. If class A needs to interact with class B, it should do so on the basis of what class B does, not because of what it is. That way we can easily swap out class B for another one that behaves the same and not worry about breaking class A. This makes our applications easier to maintain and update. Continue reading

The Great Pointer Syntax Debate


In Objective-C and other C-based languages, pointers are declared using the asterisk character. So, to declare a pointer to a UIView object called foo, in most examples and documentation you will see:

Continue reading

Double Pointers in Objective-C


Ah, pointers. Nothing strikes more fear into the heart of novice C programmers, or developers who aren’t used to them. Add to that the notion of double pointers (**) and address-of operators (&) and you are pretty much guaranteed to scare them away. But they are really not that hard, as long as you understand 3 things:

Continue reading

What is a Business Logic Layer Anyway?


Most developers are familiar with the concept of N-Tier Architecture. It is a software pattern that separates components of an application into separate logical layers to establish code boundaries, promote flexibility, and allow reuse. Most commonly this is accomplished using 3 layers:

Continue reading

Hands-On: Building iOS and Android Apps with C#

Hands On with Xamarin

Last night I attended a great .NET Mobile Developer meet up at Microsoft’s NYC offices entitled “Hands-On: Building iOS and Android Apps with C#“. It was hosted by Greg Shackles, author of “Mobile Development using C#“. Greg also presented at Xamarin’s Evolve conference in Austin, TX this past April. At this meetup he conducted a hands-on demo on how to build a simple iOS and Android app using Xamarin Studio and C#.

Continue reading

WWDC 2013 Keynote

The stakes were high for Apple to reinvent itself at this year’s Worldwide Developer Conference, with the tech world holding its breath to see its response after its recent stock and popularity slump. At yesterday’s Keynote address, Apple made several much-needed major new announcements. Ironically, many of the changes in OSX Mavericks and iOS 7 are copied directly from Microsoft, Google, and Palm (!), but that’s nothing new. Remember that Apple is not about being the first, but being the best. Take the iPod, iPhone, and iPad: MP3 players, cell phones, and tablet computers existed long before Apple refined them. Apple removes, refines, simplifies, and then raises the bar. In comparison to Android’s fast, splintered development, Apple can be perceived as slow. This may be why it has fallen out of favor with the tech media in the era of the 24-hour news cycle.

Continue reading

Brella: A Free iPhone Weather App for Commuters


Download on the App Store

Today I released Brella, my new free iPhone weather app for commuters! In the App Store now. This app checks NOAA data for rain probability in two locations: where you live and where you work. If the chance of rain exceeds your threshold for the hours that you are out of the house, it tells you to grab your umbrella.

Continue reading

iOS Training: Your Second iOS App

iOS Training - Your Second iOS App

Yesterday I conducted my second after-work training session at IIN for developers looking to learn XCode and Objective-C. Everybody walked out of there with a working Note Taker app! Here’s what we covered:

  • Table views and UITableViewController
  • UITableViewDataSource protocol
  • Prototype cells
  • NSMutableArrays
  • UINavigationController
  • Segues
  • Delegates
  • Reading and writing to NSUserDefaults

Thanks to those who came! Next week I’ll do a repeat of this week’s session for those who couldn’t make it. After that, we’ll keep working on the Note Taker app to delete and reorder rows, and using model objects to store our data. See you then!