Help me speed-grok iOS coding and Swift
January 10, 2016 5:32 AM   Subscribe

I'm an experienced programmer who needs to make an iOS app. I like to learn by inference and lack patience for verbose pedagogy, so I'm asking for resources that you would show to a hacker who needs to get up to speed with iOS development.

I grok OO and FP; I've made UIs with GTK+, Swing, and big JavaScript/HTML apps; from dorking around with all kinds of programming stuff since childhood I have a wide range of familiarity. And not to flatter myself but assume I have a sharp eye for picking up on things, like with programming stuff let's say I can assimilate information Sherlock Holmes-style.

If I had access to an iOS app development expert, here's some questions I would ask them:
  • What are some notable or unusual things in Swift or iOS that I should read up on?
  • What are the important fundamentals of the iOS programming model, from a bird's eye perspective?
  • What pitfalls should I look out for?
  • What are some excellent libraries or patterns relevant to creating a social media client type app? (JSON API, navigator-style UI)
  • What books are essential resources?
Basically I want the most valuable protips and getting-up-to-speed resources. Learn Swift in Y minutes is a great example. Articles like "Haskell Ecosystem State of the Union" are also very valuable.

Generally I'm not interested in video tutorials, because they tend to make me impatient, but I'm not opposed to them when there's something visual going on, like some complex operation in Xcode. And, I don't know how much or when to use Interface Builder, but I assume that's also most efficiently learned by watching.

I'd appreciate one-off tips, wikis, books, blogs, people to follow, presentations, anything you'd send to a curious hacker who's starting iOS development.

(By the way, I started this project with React Native and had a kind of awful experience (bugs, performance issues, lack of progress on important issues), but I've picked up the basics of working with Xcode, and now I'm ditching React Native and want to make the same thing with mostly native code, maybe a WebView or two.)
posted by mbrock to Computers & Internet (9 answers total) 19 users marked this as a favorite
 
Honestly the best resources I've found for Swift are Apple's books and developer resources. There's a whole bunch of tutorials that may drive you more or less nuts, but I did find them helpful for things like wiring up delegates in the UI.
posted by fedward at 8:28 AM on January 10, 2016


Swift is still a moving target as a language, which makes it hard for someone just learning. Sample code you find might not even compile in the current XCode, for instance. Are you committed to Swift?
posted by smackfu at 8:41 AM on January 10, 2016


I'm not committed to Swift, and that's just the kind of useful information I seek. I did just notice that the official Swift book on iBooks is written for an older version of Swift. Maybe Objective-C is a safer bet; I don't have anything against it particularly, it seems like a nice language (and I have experience with C, C++, and Smalltalk).
posted by mbrock at 8:48 AM on January 10, 2016


Apple's Swift book is one of the best pieces of documentation that Apple's ever made. The current version is for Swift 2.1. It's a quick read too. It only shows basic examples though, and when you get into app programming you'll run into trouble. You can use Apple's "Start Developing iOS Apps" guide to help you here.

You'll probably get tripped up on using Interface Builder to create the interfaces, and with using actions and outlets to hook up the UI controls and views. If you finish those guides and still have problems, the best books to use are the Big Nerd Ranch guides. There's one for Swift and one for iOS. Both were updated in the last month. You can skip or skim a fair bit of the Swift book as the start is about basic programming.

In Swift you'll probably get tripped up on Optionals, especially how they're used in the Cocoa frameworks.

If you already have programming experience with C and Smalltalk, you'll be able to pick up Objective-C very easily. Most of the difficulty with it is how it's a C-based Smalltalk. Apple has a nice guide for this: Programming with Objective-C and the Big Nerd Ranch have a very well written introduction book.

Other essentials to learn: View Controllers and Auto Layout. For web services, there's an easy JSON parser. The network classes (NSURLSession) are not too difficult to get started with. Good luck!
posted by nevan at 9:22 AM on January 10, 2016 [5 favorites]


The first 2 lectures of the Stanford Swift course are really good, and I think worth your time to skim even though they're videos. He builds a simple calculator app from start to finish, and it's the best thing I've found for immediately giving you a picture of how all the moving parts fit together.

https://itunes.apple.com/us/course/developing-ios-8-apps-swift/id961180099
posted by rachelv at 9:55 AM on January 10, 2016 [1 favorite]


I've heard many good things about ReactiveCocoa, and if as you say you like FP, then this should be right up your alley. "Reactive-MVVM" in mobile apps is a great thing and will give you an overarching structure and design philosophy.
posted by tempythethird at 10:29 AM on January 10, 2016


Once you're past the apple documentation, I've found that looking at relevant (to your app) projects on Github was a great way to get started. The link goes to an advanced search: "language:swift" will give you all the projects written in swift. I've often found that putting a method name in github, provided it's not too popular, yields interesting code as well.
The trick is to never copy paste though - make sure to understand what the code does - I tend to do that on paper, then write my own code afterwards.
posted by motdiem2 at 3:00 AM on January 11, 2016


Oh and this page is also full of interesting swift resources fwiw.
posted by motdiem2 at 3:02 AM on January 11, 2016 [1 favorite]


I like Hacking with Swift (dot com). I found it to appeal to my style of learning.
posted by phearlez at 8:26 PM on January 17, 2016


« Older What different types of visual and written...   |   Waterproof backpack for school Newer »
This thread is closed to new comments.