The Swift Dojo

A learning space for Swift and the Apple iOS tools.

Carousel imageCarousel imageCarousel image

Welcome to The Swift Dojo!

A learning space for practicing with the Swift language and iOS toolsets.
With the intent to develop world class Apps.
Via developing people with proven skills.

Neo: "I know kung-fu."
Morpheus: "Show me."

Fridays in November about 5:30pm CT we are going to develop a Baseball App with TDD - you are welcome to join in. Twitch.TV/TDDAcademy
and on YouTube also.

What am I reading... SwiftUI Views Mastery
I keep it open while coding the App.

Learning Swift Videos

Will video tutorials replace the programmer's bookshelf... I don't think so - but I have been wrong before. I still like reference books and continue to purchase them. Yet I've enjoyed learning by watching also.

TDD.Academy @ Twitch.TV and YouTube

We think a TDD session to learn Swift - Baseball - Test-Driven Development - Xcode - the XCTest framework - all of these and more will be a wonderful way to kick off learning here. Follow along with us... every Friday afternoon (3:30 PT, 5:30 CT, 6:30 ET) on Twitch.TV/TDD.Academy in Feburary we pulled a designed hitter and sent in the InspireMe! Cards App to get refactored and spawn a new app Agile Coaching Toolbox.

Our first Learning Example - Baseball

We think a TDD session to learn Swift - Baseball - Test-Driven Development - Xcode - the XCTest framework - all of these and more will be a wonderful way to kick off learning here. Follow along with us... every Friday afternoon (3:30 PT, 5:30 CT, 6:30 ET) on Twitch.TV/TDD.Academy

We are just getting in a grove with this format - streaming on Twitch - while we code live, mistakes, stumbling blocks, blockers, and revelations... live and unedited. Taking suggestion and tips form the audence chat window and making our App.

A suggestion on getting Started Programming with Swift

A great way to start coding in Swift on the iOS platform or Mac is to take an introductary course on one of the many learning sites. If you do this and have a recommendation - please let us know - we'd love to include your recommendation.

I did a Udemy course with Angela - Complete iOS App Development Bootcamp - I can highly recommend this for the novice programmer.

From Beginner to iOS App Developer with Just One Course! Fully Updated with a Comprehensive Module Dedicated to SwiftUI! The Complete iOS App Development Bootcamp. With over 39,000 5 star ratings and a 4.8 average my iOS course is the HIGHEST RATED iOS Course in the history of Udemy! By the end of this course, you will be fluently programming in Swift 5.1 and be ready to make your own apps or start a freelancing job as an iOS 13 developer.


I will also recommend Getting Started with macOS Programming by Gabriel Theodoropoulos

100 days of OSX Development video tutorials - Learn to build Mac App using Swift by Harry Ng

Any writing or video by Paul Hudson - Hacking with Swift site:

Building a SwiftUI app for iOS - YouTube

SwiftUI by Example is the world's largest collection of SwiftUI examples, tips, and techniques giving you over 400 pages of hands-on code to help you build apps, solve problems, and understand how SwiftUI really works.

100 Days of Swift This is a free collection of videos, tutorials, tests, and more, all drawn from around my work here on Hacking with Swift, and all designed to help you learn SwiftUI effectively. It’s aimed squarely at beginners who want to learn to build real iOS apps, but struggle to find a good, free course that can help them achieve their goals. If that’s you, welcome – I hope you’re ready to show the iOS world what you’re made of!

“Programming is an art. Don't spend all your time sharpening your pencil when you should be drawing.” -- Paul Hudson

A really nice book - almost like a coffee table book is SwiftUI Views Quick Start by Mark Moeykens.

You may want to create a mind-map of SwiftUI and figure out what interest you most and start there. I forsee one BIG problem with this... creating a reasonable mind-map of SwiftUI will be very difficult if you don't know it very well yet... so start with someone else's map: Karin Prater has a nice one: On the road to learn SwiftUI

XCTest framework and XCode integration.

Notes on XCTest Framework

Want to know what calls/methods are avaliable in the UI portion of XCTest? Try Paul Hudsons' Cheat Sheet ( ).

Notes on Testing Views

Testing a view is hard. Even harder is Test-Driven view design. It may be easier to code the view and then imediately write the test. But one thing is sure - ViewInspector should be in your toolbox.
ViewInspector ( ) is a unit testing framework/library for working with SwiftUI views. It allows the developer to inspect a view, traverse the view hierarchy down to an interesting view under test and access that structure. Pulling out values, strings, properties and testing them for validation. With ViewInspector the integrations/system test that might take seconds with XCTest-UI will run in microseconds; converting the test into a quick to execute test is worth lots of effort never wasted on slow UI-Tests.

A TDD Example for the Fibonacci Sequence - for Swift using XCode

The classic Kata that I learned many moons ago is the Fibonacci Kata. First described to me in Kent Beck's TDD book, appendix II p211.

Start with this peusudo code.

Fib(0) should return 0

Fib(1) should return 1

Fib(1) should return 2

Fib(2) should return 3

Fib(3) should return 5

Fib(5) should return 8

... continue until you have a well factored and concise Fib() function... Red-Green-Refactor. Here is a Starter Project on gitHub.

My last attempt at this Kata the implementation code started like this:

step 0:

static func fib(_ number: Int) -> Int {

return 0


step 1:

static func fib(_ number: Int) -> Int {

return number


my next implementation was an infinite recursive function - it failed....

The Ultimate Portfolio App

I'm going to follow along with Paul Hudson's Ultimate Portfolio App. See his site: Hacking with Swift - for more info.

Day one - watching his intro videos... trying to decide on the App I will build - he's attempting to design in enough flexibility to allow the viewer to write a unique app as we follow along... (will it work?). Come along and see...

Paul's got 16 videos up in part 1 of the Ultimate Portfolio App series and continuing to write and film more. I was doing great following along until #13 Custom sorting for items... that video has quite a few options... and it got confusing what code I should use, what I should leave in, vs what to pull out. It's going to take me some time to rewatch and fix my mess.

I can enthusiastically recommend this purchase.