Introduction

Welcome to this module on how you can use recent advancements in AI-tooling to assist with the development of iOS apps.

During this module, we’ll take a look not only at some specific technologies that can be leveraged for iOS development, but also at general techniques that can be applied across a whole range of tools. Don’t think that just because you dislike a particular technology covered in a lesson, that you should skip it. Many of the techniques covered will apply to all of the LLM-based tooling that are available today.

You might well also be aware of the incredible pace at which AI is improving. This makes creating learning resources especially challenging. As such, this module attempts to concentrate on the concepts of where and how you can use AI to improve your development workflow, along with introducing details of the current state-of-the-art technologies. You are encouraged to take what you learn here and apply it to whatever the current, most-recent technologies are offering. We will endeavour to update and create new content as paradigms change, but it’s likely that the concepts covered in this module will be useful even as the technology progresses.

Before jumping into the content itself, we’ll cover a little background.

What is AI?

At this point AI is essentially just a marketing term. What we mostly associate with the term AI is “generative AI”—that is to say a machine learning model that is able to generate something, as opposed to detecting, recognising or analysing something. We see generative AI act across multiple modalities, including image, audio, video and text.

The technology that is most commonly thought of as AI currently is the text-generation models. The underlying technology is known as Large Language Models (LLMs). These are Machine Learning (ML) models that have been trained on vast corpuses of text, and have become popular through services such as ChatGPT.

Ata very high level, they work by determining the most likely sequence of tokens (for the purposes of this, think “words”), in response to a given query (prompt), based on its vast collection of “previous things that have been written”. It doesn’t necessarily understand what it returns, but it turns out to matter less than you might expect.

Since LLMs work with text, they tend to excel at working with code. The combination of the fact that programming languages are incredibly structured, and the huge amount of open source material available for training, make writing code a great candidate for the application of LLMs. And in fact, that’s what all of the AI-tools we’ll look at in this module rely on.

There’s a selection of different LLMs, both proprietary and open, that you can use to help write code. Companies like Google, Meta, OpenAI and Anthropic all build models, and continually update and release new versions. They also come in different sizes—the larger the model, generally the better it is, but it is also more expensive to train and operate. So often you’ll figure out a combination of models that tradeoff cost against accuracy.

Since models are continuously being updated and released, we won’t spend much time discussing them in this module. Instead we’ll be looking at the tools and techniques which use these models to assist with building iOS apps. Although these will improve as well, the fundamentals will likely remain the same for longer.

General Limitations of LLMs

There are several limitations of LLMs that are relevant to this module. LLMs have a tendency to hallucinate—i.e. just making stuff up. This is often found in code, since it simply does not work. But you need to be careful blindly using code generated by an LLM.

LLMs are also non-deterministic. That is to say that if you ask the same question twice, you’ll get different answers. This is an integral part of how LLMs operate, but it can be quite confusing and frustrating when writing code. It does however allow you to dislike and answer, ask again, and get something different.

As a brief aside, the non-deterministic aspect of AI makes recording training videos especially challenging. Despite planning what you want to cover, what problems you’d like to demonstrate solving, you’re at the mercy of the AI as to what it is going to throw at you. Hopefully you don’t notice this too much in the videos, as we’ll try and concentrate on the techniques, rather than the code being created.

Costs

LLMs are computationally quite expensive to train, test and operate. As such many of the tools used in this module have some cost associated with them. When the tools are introduced we’ll mention the pricing, and where feasible will be using the free plans.

You should be able to complete this module, following along, for less than $20.

Suggested Approach

Unlike many other of the learning resources on Kodeco, we won’t be focusing that heavily on the code we’re writing. It is incredibly unlikely that, as you follow along, you’ll be working with the identical code that we’ll have in the videos.

Instead, focus on the general approach and techniques. Try to complete the general aim of each lesson, using the tools and techniques covered.

The code and much of the output of the AI tools will be included in the materials repo, so you can get an idea of what has been built, but don’t expect that your final project will look the same as ours.

It’s also worth mentioning that you’ll repeatedly hear “at this point we need to review this, but I’m not going to here”. That’s primarily because a video of somebody doing a code review would be really dull. There are some bits of code that you don’t really mind are a bit wrong, or you’d notice a problem right away. But other bits are high-risk or mission critical. Part of using AI is similar to working in an engineering team: you have to evaluate risk-vs-reward for code that enters the codebase—how thoroughly tested and reviewed it is depends on what its purpose is.

Please bear this in mind as you “vibe-code” your way to the App Store. Don’t let AI write important code completely unchecked. After all, you’re responsible for what it does…

Good Luck

Although you might not be a huge fan of AI, I think it definitely has a role in software development in the future. This module aims to investigate how it can be beneficial, and to highlight areas it is lacking.

It doesn’t seem that it’s coming for our jobs yet, but what we do will change. Let’s figure out how, together!

See forum comments
Download course materials from Github
Next: Using ChatGPT to Build iOS Apps