How an indie dev used ChatGPT to build an iPhone app from scratch [Planet of the Apps]

By

AI-generated image of a silver robot sitting at a desk with a MacBook Pro and iPhone
No artists were put out of a job in generating this image.
Image: DiffusionBee/D. Griffin Jones/Cult of Mac

Planet of the Apps bug Planet of the Apps is a series of interviews with app developers about making, marketing and maintaining apps in the App Store.

Swiss developer Morten Just has built a whole slew of useful Mac apps under the name Otato. But his latest app wasn’t made by him at all: He asked ChatGPT to build it for him.

While Just earned his stripes as a professional programmer, he didn’t write a single line of code to create 5 Movies. It’s an iPhone app that gives you five daily movie recommendations, shows you the trailers on YouTube and tells you where you can stream the films. (It’s currently pending App Store approval.)

These days, artificial intelligence is making headlines for giving users powerful tools that can write essays, recreate impressive art and give technology journalists the heebie-jeebies. 5 Movies is proof that, with a big assist from AI, it only takes a few prompts and a basic understanding of Xcode to create an iPhone app without any coding yourself.

When I interviewed Morten earlier this week for Cult of Mac, I asked him how he got ChatGPT to build his app, what the generated code looked like, and how AI-coded apps will impact ordinary people as well as software developers.

Interview with Morten Just about ChatGPT and coding

Click here to jump to the interview, but if you need a refresher on the terminology:

  • Large language models, aka LLMs, are predictive algorithms. They are given huge data sets of text as training input and can instantly generate all sorts of output based on a short prompt.
  • GPT-3 is the powerful LLM created by OpenAI in 2020. The San Francisco company released GPT-3’s successor, GPT-4, earlier this month.
  • ChatGPT is a user-friendly interface that lets you give prompts to GPT-4 and receive answers in your web browser.

Morten and I used these terms somewhat interchangeably in our discussion. The transcript has been lightly edited and annotated with links for clarity.

Prototype version of 5 Movies in Xcode, alongside the app running on the iPhone simulator.
This is the prototype version of the app that ChatGPT was able to crank out in mere minutes.
Screenshot: D. Griffin Jones/Cult of Mac

Interview

Cult of Mac: You’ve been “building and growing products” for over 20 years. Is this the fastest development time from idea to publishing that you’ve ever had?

Morten Just: Hands down, yes. I had the first version running within five minutes, without having to find an API or look at its documentation.

I also have to say, this wouldn’t have been as easy five years ago, even with GPT-4. App development in general — especially on Apple platforms — has been simplified in a huge way.

CoM: You posted snippets of your interaction with ChatGPT on Twitter. How much of the full conversation was that?

Just: There was a lot of back and forth along the way. The first version it gave me produced three to four errors, so I pasted those errors back into GPT-4 and it solved the issues.

At one point, GPT-4 asked me to add debug print statements to the code — a method used by programmers to figure out what the code actually does. With those print statements, it was able to fix one of the hairier bugs.

CoM: How does the back-and-forth interaction compare to directing human programmers, in your experience?

Just: With ChatGPT, it’s hard to compare. A human programmer can run the code immediately and see if it worked or not. I’d say the back-and-forths felt more like pair programming. I’d supply some ideas and it would guide me on how to add those ideas to the code.

A history of working with AI

CoM: You’ve been experimenting with GPT-3 for far longer than anyone else I’ve seen. You’ve prototyped AI-generated video ads, live Keynote slides, proofreaders and a predictive self-typing iPhone keyboard as early as 2020. Were you surprised when ChatGPT exploded into the news a few months ago?

Just: Yes, that was surprising! I think I saw OpenAI admitting that they were surprised, too; they just thought they released a fun new way to use GPT-3.

It really shows the power of a good user experience, doesn’t it?

CoM: I looked at the sample code you posted of an earlier version of the app. It looks like perfectly reasonable Swift to me. Does anything stand out to you about it?

Just: Yeah, I had the same feeling. Until someone in the replies pointed out a memory leak. In fairness, I’d have made the same mistake and not caught it.

A snippet of code from the prototype in Xcode
ChatGPT writes better SwiftUI than I do.
Screenshot: D. Griffin Jones/Cult of Mac

How AI will affect web search in the future

CoM: By contrast, I’ve found New Bing and Google Bard to be somewhat unimpressive so far. As a former Googler yourself, can you imagine how AI tools might substantially change web search? 

Just: I agree. This sums up the current state pretty well.

I think we’re seeing an overreaction towards LLMs (large-language models) when it comes to search.

For a large part of searches, “just text” makes little sense. It’s not “brain-friendly” in the way shapes, colors, recognizable icons are. While our brains process text, we basically slow down like an overheated laptop: We can’t talk, we can’t listen, we can’t see because we’re so focused on the letters.

Over the last 20-plus years, Google has perfected these results. They serve up interactive mini-apps for currency conversion, flight trackers, hotel booking, football scores. That’s just too hard for LLMs to do at the moment.

LLMs might enable entirely new categories of search. It’s not unthinkable that LLMs could design and code up new UIs or illustrations on the fly, perfect for an ultra-specific niche search in a highly specific situation. Maybe that niche is just one person. That’s when search would change substantially.

The future of AI-powered coding

CoM: If today, a tech-savvy person like you can coax ChatGPT into developing a small app with some back-and-forth guidance, how far away do you think we are from ordinary people typing a single request into their iPhone and getting a custom app generated, compiled and running on the fly?

Just: I think this would require a number of breakthroughs.

  1. AI would get the code and design right.
  2. Apple would approve of this kind of software, maybe in a sandbox, so it’s safe.
  3. Users would be able to know and express exactly what they need. It might be harder than it sounds.

Maybe a part of that breakthrough requires a new level of empathy; maybe users should just express what they’re frustrated about; maybe there’s a class of apps that can be auto-generated from context, no input needed.

I do think there are several stops along the way where the AI chooses among building blocks, like we’re starting to see among startups.

How AI will change the app industry

CoM: As an independent developer yourself, are you worried about what these tools might mean for the job security of people in your industry?

Just: I’m not worried. We’ll be able to try more things and ship faster and do all the surrounding work faster, like answering emails and marketing tasks.

You could imagine solo builders starting to ship what medium-sized companies used to ship, medium-sized companies starting to ship what big companies used to ship, and so on. Something similar happened with cloud services; all of a sudden you no longer needed servers or people to maintain them.

I think it all comes down to solving a user’s problem in a deeper way. But sure, if all you’re doing as an indie developer is selling tools like a simple video converter, you might be in trouble.

CoM: As a former Googler, how do you respond to concerns that larger companies will cut their staff and encourage the use of AI tools as a means of cutting costs?

Just: It’s a complex topic with a ton of variables, so it’s hard to say. I don’t think staff cuts are as simple as, “Hey, we got faster computers, half of you are fired.”

Using AI to simply cut costs seems like a shortsighted win, and I doubt Google would do something like that. But sure, in an environment where there’s no competition and you have a fixed output from the perfect product, then I’d be concerned.

I’m far from being an expert in business economics, but if I saw earnings-per-employee go up with AI, I’d think twice about letting them go.


Note: Just’s AI-coded app is called 5 Movies. Hopefully, it’ll be on the App Store soon.

Newsletters

Daily round-ups or a weekly refresher, straight from Cult of Mac to your inbox.

  • The Weekender

    The week's best Apple news, reviews and how-tos from Cult of Mac, every Saturday morning. Our readers say: "Thank you guys for always posting cool stuff" -- Vaughn Nevins. "Very informative" -- Kenly Xavier.