As you’re learning iOS so you can get a job or build your own apps, there’s one Cocoa Touch class in particular that you need to be intimately familiar with. You’ll use UIViewController in 99.9% of the apps you build – whenever you create a view in iOS, it’s backed by a view controller. You subclass UIViewController (or one of …
Year in Review 2014: What I learned about building an audience, selling products, and productized consulting
This year, I learned a few lessons about creating and selling products, as well as about how to start productizing my services. I’m happy that I accomplished my (relatively modest) goals stated in last year’s Year in Review, and that I had such an awesome time with my family during my 7-week paternity leave. If you’re consulting or building and …
Wrap your head around optionals in Swift
Since you’re pretty much required to use optionals in Swift, you need to know how they work if you want to understand Swift. But if you’re like most developers who are new to Swift, you might still be having a little trouble with them. Or a lot. So read on to learn about what they are, how to declare and …
How do you distribute beta iOS apps to your team?
A few people have asked me recently how I distribute beta iOS apps to my team. The short answer: Crashlytics Beta. It’s free, simple, and easy for my team to use. Yes, I’m aware that Apple now owns TestFlight and that it’s also free to use. But did you know that it only supports iOS 8 and above? So you’re …
What third-party libraries do you use for iOS development?
I add new third-party libraries to my apps fairly conservatively, as I don’t want to depend on a library where development may stop in the near future, leaving me without any support when I have questions and issues with it. Here are the ones I use regularly – that I’m reasonably confident will continue to be developed and supported for …
Will Apple reject your app if it’s not unique?
If you’re building an app, you may be wondering whether it’ll be unique enough to make it through Apple review process. This is an especially common question among people who have never submitted an app to the App Store before. And it’s no wonder – the stories about apps being rejected are circulated much more widely and loudly than the …
iOS UI: Choosing between Pickers and Table Views
Pickers and table views are great ways to provide your user with an easier way to enter data in your app – and they allow you to control the input you receive so you get less garbage. A few days ago, I had a one-on-one coaching session with a client who wanted some advice on whether to use a picker …
How to use git for iOS projects
When I’m working on a team, my preferred workflow is to use feature branches and pull requests with git. This comes largely from Scott Chacon’s article called GitHub Flow, though I’ve adapted it somewhat for iOS development. Anything in the master branch is good enough to build and send out to testers. To work on something new, create a descriptively …
A safer approach to JSON parsing in Swift
If you made it to the Beginning Swift workshop, you saw that we used valueForKeyPath: to parse the JSON from iTunes like this: var jsonError: NSError? let json = NSJSONSerialization.JSONObjectWithData(data, options: nil, error: &jsonError) as NSDictionary if let unwrappedError = jsonError { println(“json error: \(unwrappedError)”) } else { self.titles = json.valueForKeyPath(“feed.entry.im:name.label”) as [String] } And during the workshop, I mentioned …
Swift’s var is not Objective-C’s id
I saw a YouTube video a little while back that said “var in Swift is basically the same as id in Objective-C.” And honestly, when I first heard that statement, I thought, “yeah, var is like id in Objective-C. You just use it before a variable’s name when you don’t care about its type.” But that’s totally wrong, and I’ll …