S01E02: [TDD 🍅 1] Creating a Swift Framework – The Game Engine


★ Register Now to Our Free iOS Career Course!

Subscribe to our channel:

In this episode, we dive into our first lines of code. Before we begin building the project, we agree on a set of rules such as:

– Follow the Pomodoro Technique for segmenting workload and time
– Develop the system by writing tests first
– Separate the responsibilities of the system in modules

We start by creating the QuizEngine project, a module responsible for the business logic of the system. Despite the fact that we are building an iOS app, the QuizEngine is created as a macOS framework, allowing us to embed it later in any platform specific deployment target (iOS, tvOS, watchOS, macOS). We also get for free blazing fast unit tests 🚀!

Our first component is the Flow, a class responsible for controlling the routing of the system based on a simple question, “Are there any more questions to show?”.

– In case there are we want to get the answer for the current question and move on to the next one.
– If there are no more questions we want to route to the results.

As we test drive the Flow we get into how we choose to create classes over structs, abstract behaviours by using protocols, boost your productivity by using a somewhat obscure feature of Xcode and much more!

Previous episode:

Episodes playlist:

Follow the series progress on GitHub:

Visit our website:

Connect with us on:

Nguồn: https://taibangoc.com/

Xem thêm bài viết khác: https://taibangoc.com/game/


  1. Just discovered your channel and already subscribed, happy to be part of the Essential Developer community !

  2. You mentioned that "sut" is System Under Test. I thought that "sut" is the abbreviation of Subject Under Test.

    Is System Under Test the same as Subject Under Test?

  3. Just discovered this series and 2 videos in I had no choice but to subscribe. Really good work, the paired programming environment really helped to keep the content engaging. I learned a lot watching this, thank you 🙏

  4. At about 7:21 you casually add the concept of a router for communication.  It's kind of a big conceptual leap from a flow and quite arbitrary isn't it?.  Isn't a flow the mechanism for transporting something (data, ideas, water, electricity)?  I'm not sure how you arrived at the idea of a router as being integral to the thought process of defining a flow.  In thinking of a flow I never think of a router.  I tend to think of pathways, sources, destinations, directions (upstream/downstream), flow volume, flow rate…  Having offered this criticism please don't interpret this as being negative as I think your videos are full of good information..

  5. Hey guys, thanks for amazing season 🙂
    Small note: 8:18 you don't need to press "Command" button in this great combination, "Shift" + "Option" is enough (at least, in Xcode 9)

  6. Very good "watch us do" tutorial.
    But, your naming convention is pretty weird, you should stick to camel case or snake case, not both…
    Also, the swift convention (just like Javascript) is camel case…
    But still, really good job guys…


Please enter your comment!
Please enter your name here