Discover more from The Glimpse
How I built an iOS app with ChatGPT (A.I.)
Using A.I. as both a paired programmer and a teacher
This past weekend I was traveling to the PNW and had a couple hours to kill at the AirBnB Saturday morning.
I had been watching the GPT-4 hype unfold on Twitter since Tuesday and even collected a list of the 10 coolest ways folks were using it and decided it would be fun to put it to the test myself. So I upgraded to ChatGPT Pro ($20/m) which let me access GPT-4 and got to work.
My goal was simple: build an iOS application.
I’ve build React/Node web apps in the past but I wanted to use a language I had never learned before so I could handicap myself and really see what GPT-4 could do.
Let’s get into it.
Welcome to Making Product Sense
Join thousands of others like you, learning how to build great products and companies from world-class builders.
Since my wife had just started her own newsletter (Subscribe → Functional Medicine Weekly), I decided to build a simple app that would store supplement protocols for chronic illnesses.
My first prompt just described the basic functionality of the application. I didn’t go into too much detail because I honestly didn’t know what I wanted the app to become yet. I just wanted to get started.
Here’s what it said.
One thing that was really beautiful to me from the get-go was that it broke down my rambling prompt into a clear plan of action and then it began to write the code. I copied and pasted the code it generated into the files it told me to. Simple enough.
Along the way, as I began to ask it to make edits, I would ask clarifying questions like this one…
…and drop in some errors I was running into like this one.
Like I said, I didn’t know a lick of Swift so I was relying on ChatGPT to be as clear as possible.
But as I started to get the hang of some of Swift’s semantics, I felt like I could implement the updates myself on a per-line basis without having to rely on ChatGPT to re-generate an entire file at a time for simple copy-and-pasting. So I asked it to just give me the code that needed to be changed and nothing else.
The whole thing took me maybe an hour and a half.
Within 5 minutes I had an initial build running in the X-code simulator.
Within 1 hour I had implemented a few additional features and troubleshooted a handful of bugs.
Within 1.5 hours I had cleaned up the UI a bit and made some adjustments to make the user experience a little cleaner.
Here’s a short clip of the app after about 10 minutes.
A few things worth noting:
I didn’t hook up to an API
I didn’t set up a database
I didn’t use any of the phone’s hardware (GPS, gyroscope, accelerometer etc.)
I didn’t even leverage GPT-4’s powerful multi-media capabilities (I don’t have access to their API yet)
I’m quite sure that someone who knows Swift could have coded the whole thing in the same amount of time that it took me to write the prompts and copy and paste it over. Or use ChatGPT to build an even cooler version of the app in the same amount of time.
But the fact that I was able to build a simple Swift app with no prior knowledge of Swift is impressive, dare I say mind blowing. Which brings me to the larger point here.
The rate at which builders can build just rose dramatically.
When Mark Andreessen wrote “it’s time to build” back in 2020, I don’t think he anticipated this incredible advancement 3 years later but I guarantee you he’s stoked out of his mind right now. We have an opportunity for more people than ever to bring their imaginations to life. It’s a powerful spin of the flywheel that I hope will spill over from the bits and bytes of software into the atoms of hardware.
That’s all for this one - I’ll catch ya next week.
❤️ Smash that heart!
If you enjoyed this article, smash that heart icon to show some love! 🙏