• Nadim's Blog
  • Posts
  • I spent a week learning iOS dev from scratch using only ChatGPT

I spent a week learning iOS dev from scratch using only ChatGPT

Intro

I use ChatGPT almost every time when I’m coding and it’s quickly become my one of my most used tools possibly as much if not more than Google. I think of Google as giving you a bunch of info then you find the answer while ChatGPT is just telling you the answer directly. So I decided to challenge myself by building an iOS app from scratch using nothing but ChatGPT.

I chose to this experiment with iOS because I’ve always felt like as a developer I should know some mobile development given the ubiquity of mobile devices. I was originally going to choose React Native but I decided it would be better to first learn the native tech so I understand what React Native is abstracting away. I specifically chose iOS over Android since I’ve programmed in Java and other languages building websites and APIs but haven’t done any Swift/SwiftUI before so it’s completely new to me.

My first rule is I’d only build a product that I would use and so I decided to build Todaying, a classic todo list app designed to track your tasks for the day. I made a small landing page at Todaying.app where you can sign up for the TestFlight version of Todaying if you’re interested.

To keep this post simple I’m gonna go through the good, the bad and the mid of my experience.

The Good: Code just works

Picking the good part was extremely easy: ChatGPT is excellent at generating working code. Especially if the code isn’t too complicated like the Todaying app. Almost all the Swift/SwiftUI code ChatGPT generated worked out of the box or only needed a little modification at most. Even if there were scenarios were the code didn’t work out of the box it still provided a good base for me to start with and work off that.

Working code is great but should prob learn why it works too

The drawback to generating working code is that instinctively I was less inclined it to understand it at a deeper level since it worked and I was focused more on moving fast. At the end of this challenge I definitely know more Swift/SwiftUI than before but I would still say I need to go and learn the fundamentals.

The Bad: Reinventing the Wheel

NavigationView provides this functionality out of the box but ChatGPT wanted to build it from scratch

The GIF above is a pretty popular animation within iOS that I wanted to implement in my todo app. If you’re familiar with SwiftUI then you know this is pretty straightforward by just using a NavigationView and NavigationTitle. When I asked ChatGPT it started giving me complex code to build out the animation from scratch as if it didn’t know the built in method. This could’ve sent me down a rabbit hole if my spider senses didn’t tell me the solution couldn’t be this complicated. Later on when I started using Google again I found the proper solution and implemented it in my apps accordingly.

The Mid: Great at coding products, meh at using products

This may be cherry-picking but ChatGPT is good at helping build software through code but less so in helping use existing software through UI. Usually I wouldn’t think this is an issue but there were a few moments were I had to use the XCode UI such as picking a starter template, generating models for Core Data or figuring out how to add an app icon for Todaying. ChatGPT did give some info that was accurate but I can see this quickly getting out of date with how fast software updates. Having a ChatGPT like AI built into XCode and trained on latest XCode docs would help solve this issue and wouldn’t be surprised if we saw something like this eventually.

Final Thoughts

Overall ChatGPT was great for helping build features out fast but I’m not comfortable using it as my primary source of learning something new. ChatGPT will still be a major tool for me but definitely in conjunction with Google and other resources. Given how fast AI has been evolving I wouldn’t be surprised if my opinion changes over the next couple of years.