Skip to content

Instantly share code, notes, and snippets.

@nuclearghost
Last active August 29, 2015 14:23
Show Gist options
  • Save nuclearghost/d986d6a476178e6456bf to your computer and use it in GitHub Desktop.
Save nuclearghost/d986d6a476178e6456bf to your computer and use it in GitHub Desktop.
Swift Learning Resources

#Swift Resources

This is a set of open source resources that are useful for learning about app development in swift

Applicaions

  1. Todo Swift A simple Todo app written in swift. Shows how to enter text and some basic interactions with a UITableView
  2. Swift RSS Sample This is a simple app that injests a hardcoded RSS feed and displays the data in UITableView. This uses cocoapods which is the most widely used dependency maanger for developing iOS apps.
  3. Swift NYT Reader This is a small sample app that I made very similar to the RSS reader. It's a bit more complex with manual JSON parsing and conditional image displaying.
  4. Swift Flickr A pretty straightforward app that pulls data from the Flickr API. It has a good example of using a bridging header to work with objc code in swift. Luckily lots of libraries are ported now, so this is becoming less important.
  5. HearNow This is an app I wrote with a friend for SwiftHack@GitHub in fall 2014. It uses the SongKick API to find concerts nearby and then the LastFM API to find artist details.
  6. 2048 An implementation of the game 2048 in swift. A good example of using gesture recognzers and some nice object oriented programming. There are some good model tests.
  7. Flappy Swift Yep, it's Flappy Bird in Swift. SpriteKit is a great addition to the iOS family. There are a lot of APIs to learn and this is a great example of a well performing 2D game.
  8. Hark Hark is a text to speech app. It uses AVSpeechSynthesizer which was a new API in iOS7. This is a nice app because there's both swift and objc in the same repo. Nice to see how things are implemented in different ways.
  9. Swift Instant Weather A great little weather app that also has a today widget. Uses very modern features like Carthage for dependencies and SwiftyJSON for JSON handling.
  10. Timerity This is a pretty great example app of building both and iphone app and watch kit extension. It's used to create named timers that can be viewed from the phone and watch. This repo also has two presentations inside from when Curt Presented at different events.

Libraries

  1. Swift String Tools A simple one file implementation of common string utilities. No tests.
  2. Swift Forms An important part of any crud app is forms. iOS doesn't have great form support out of the gate so this is a good library to look at. There is a sample app using all the different verisons of the forms
  3. iOS Charts A very impressive charting library written in swift. Maybe a little graphics intensive, but even CRUD apps often need charts. No tests unfortunately.
  4. Swifter A Twitter framework written in Swift. There is access to the timeline and streaming APIs. Also can post status updates. There are demo apps for OSX and iOS.
  5. SwiftyJSON Swift has a great type system but dealing with JSON can be a bit annoying with always unwrapping optionals. SwiftyJSON does a great job of handling this for the user and seeing how this is implemented is valuable for learning swift.
  6. KingFisher This is an image cacheing library with multiple layers of cacheing. It has a demo app and demo watch kit app and extension. It has pretty good test coverage as well.

Testing Resources

Testing is unfortunately not a first class citizen like it is in something like ruby on rails. Apple has been making steady improvements in Xcode, but still might not be up to most people's expecations comign into app development. If you're more into bdd than normal tdd one of the following would be worth checking out

  1. Quick a bdd style test framework.
  2. Sleipnir another bdd style test framework inspired by Cedar, a popular objC bdd framework.

Other Resources

The official Apple book The Swift Language should always be handy and definitely worth a read. They've kept it up to date as they've updated the language to 1.1 and 1.2

Design Patterns in Swift is great if you're a gang of four fan, which you should be.

For iOS 8 specific features, there's a great blog series/ebook called iOS8 day by day. Here's a link to the blog, ebook, and github repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment