Início TECNOLOGIA How to create your first iPhone app with AI – no coding...

How to create your first iPhone app with AI – no coding experience needed

11
0

 

 

Anadolu / Contributor via Anadolu / Getty Images

Follow ZDNET: Add us as a preferred source on Google.


ZDNET’s key takeaways

  • You need a Mac, Xcode, and a connected AI model.
  • Start tiny, build confidence, then expand your project.
  • AI coding works best when you give clear, specific intent.

So you want to create your own iPhone app, stick it on the App Store, make a million dollars, and retire to Maui? Well, how about if I just help you with the first part, and we see how it goes?

After all, creating a hugely successful app takes a lot more than just coding. It involves infrastructure, marketing, vision, capitalization, team composition, and just plain luck. All of that’s on you.

But in this article, I’ll show you how to use an AI to generate your very first, very, very basic iPhone app. We’re going to do it step by step, screenshot by screenshot, so all you have to do is follow along.

Also: The best free AI for coding in 2025 – only 3 make the cut now

So go ahead and slap on some tunes, and let’s get started. Right now, I’m listening to Antti Martikainen on Spotify.

Let’s meet your tools

The main tool you’ll be using is Xcode. Xcode is a development environment, otherwise known as an IDE (the “I” is for interactive). An IDE is your working space while coding.

If you’ve used Photoshop, you know it centers around photo editing, but it has a whole bunch of tools and views, all in one program. If you’ve used Adobe Premiere, DaVinci Resolve, or Final Cut Pro, you know that they all have a wide range of video editing tools, all inside one program.

Also: Why I’m switching to VS Code – it’s all about AI tool integration

An IDE is like that, except for programming. Most IDEs contain a text editor, a file browser, a debugger (used to find errors), a variety of source management tools, data management tools, and more. They also “build” the app when you’re ready.

Actually, let’s talk about building the app with another analogy, the kitchen. Now, I’ll admit that throughout my 30s, my primary use of the kitchen was to store and microwave leftovers. There were entire appliances (the thing that made pans hot and did baking was among those that went unused).

But I’m a big boy now, and I understand that there’s a process called “cooking” that involves more than taking a restaurant package and tossing it into the zapper. In fact, the prep work involved with cooking — from choosing the recipe to cutting up the veg and combining ingredients — is all done before filling a skillet or a baking pan and applying heat.

In Xcode, you need to get your ingredients together, too. Those include blocks of code, settings for apps, and various assets (like icons). Most of the developing will be the creating and gathering of these tools. Then, when you’re ready, you’ll tell Xcode to build your app, which is when it applies the heat, taking all your components and turning them into something magical running on your phone.

In addition to Xcode, you’ll be using an AI large language model. Apple’s own model is available for Xcode. That said, you’ll probably do better with a more comprehensive tool like ChatGPT or Claude Code, because both have extensive coding abilities built in. In this article, we’ll use Claude Code, but you can make other choices if you want.

What’s all this cost?

Xcode is free. You do need a Mac. All you need to do to get Xcode onto that Mac is to open the App Store app on your machine, search for Xcode, and download it.

app-store
Screenshot by David Gewirtz/ZDNET

Depending on what you plan to do with your app, you may need a membership in Apple’s Developer Program, which costs $99 per year. If you plan on selling or distributing your app, a Developer Program membership is a must.

You’ll also need it if you use certain features in your app. For example, I’m developing an app that scans NFC tags and takes photos. Both of those feature sets are only available with a Developer Program entitlement.

Also: What is AI vibe coding? It’s all the rage, but it’s not for everyone – here’s why

If you’re planning on using an AI to “vibe code” your app, you’ll need a large language model. So far, Apple’s own AI models are meh. I’d advise you to choose between ChatGPT and Claude.

(Disclosure: Ziff Davis, ZDNET’s parent company, filed an April 2025 lawsuit against OpenAI, alleging it infringed Ziff Davis copyrights in training and operating its AI systems.)

Both are good. Both have very basic free versions. But the fact is, you won’t get very far without spending some money. Both start at $20 per month. If you’re not doing too much coding, that will work for you. You’ll get roughly five hours of constant coding work done before they ask you to take a time-out.

Also: I did 24 days of coding in 12 hours with a $20 AI tool – but there’s one big pitfall

If you’re just dabbling, or you’re going real slow, that should do you. But if you’re powering through a project, you’ll probably need to upgrade to the $200 per month Pro mode for ChatGPT or the $100 or $200 Max modes for Claude Code.

Also: I got 4 years of product development done in 4 days for $200, and I’m still stunned

Don’t worry, though. For this intro, you won’t need to spend much at all.

Install Xcode

Once you download Xcode, click to launch it. At this point, you’ll be given the option to install Xcode components. You’ll see this screen.

xcode-components
Screenshot by David Gewirtz/ZDNET

Since we’re building an iOS app, make sure that’s checked. I added the Apple Watch components because I might want to make a Watch version of my app. It’s not very big, so you might as well go for it.

Make sure you check “Predictive Code Completion Model,” because that will net you Apple’s Code Intelligence features.

Click Download & Install, and then go get your hot beverage of choice. Right now, I’m sipping Kirkland Pacific Bold, which is helping me stay alert while writing.

Connect your AI

First, make sure you have a ChatGPT or Claude account. Once that’s set up, switch back to Xcode. Choose Settings under the Xcode menu, and then choose the Intelligence tab.

intelligence
Screenshot by David Gewirtz/ZDNET

Code Intelligence is set up to easily configure either ChatGPT or Claude, but you can add other models via the Add a Model Provider button. That takes more fiddling, so we’ll just connect Claude.

Also: I got 4 years of product development done in 4 days for $200, and I’m still stunned

By the way, either ChatGPT or Claude will do for this. I’m using Claude here because I’ve previously talked a lot about ChatGPT coding in ZDNET and want to give Claude some attention, too.

Go ahead and click the Claude in Xcode button, and you’ll be taken to an authorization screen. A similar screen will be presented for ChatGPT. Click Authorize.

authorize
Screenshot by David Gewirtz/ZDNET

You can actually authorize more than one AI in Xcode, but only one can be active at a time. To choose which one is active, click the toggle button for the one you want to enable. Here, I’ve enabled Claude.

active-ai
Screenshot by David Gewirtz/ZDNET

Let’s start making an app

Okay, it’s time to make our first app. Now, don’t get too excited. We’re going to make a very simple app. But it will prove you can make an app that runs. Besides, going from absolutely nothing all the way to installing an app on your phone is quite a big accomplishment.

When you launch Xcode and it’s not already in a project, you’ll see this dialog. Choose New Project.

new-project
Screenshot by David Gewirtz/ZDNET

If you don’t see that screen, or you accidentally closed it, just move on to the next step. Selecting New → New Project from the File menu will also get you to the project template screen.

project-template
Screenshot by David Gewirtz/ZDNET

Make sure iOS is chosen as your platform (at 1) and App is chosen (at 2). Then click Next.

You’ll be asked to name your project. Mine is called Filamentory, for “filament inventory.” I want to build something that tracks my 3D printer filament, but the same kind of project could be used for your wardrobe, book collection, music collection, knitting patterns, sheet music, yarn stash, fabric stash, hobby management, model kits, LEGO sets, photo management, spare parts, and more.

Also: Why AI coding tools like Cursor and Replit are doomed – and what comes next

Don’t get too excited, though. In this article, all we’re going to do is get it to say hello. But I needed to give it a name to show you what to do. I’ll be digging in later to create the filament inventory app using AI. Stay tuned, because I’ll have more to say about it in future articles.

project-details
Screenshot by David Gewirtz/ZDNET

Take a look at the above screen. There’s the “Filamentory” name. Let’s skip the team and organization identifier for a minute. After that is the Interface and Language. We’ll be using Apple’s Swift for both, since that’s a very common and powerful language designed by Apple for developing apps in the Apple ecosystem. Go ahead and pick Swift and SwiftUI.

Also: You’ll code faster and spend less with OpenAI’s new GPT-5.1 update – here’s how

Now let’s go back and look at Team. To do so, take a look at this screenshot.

team
Screenshot by David Gewirtz/ZDNET

This is where your developer account details would go if you signed up for a $99 per year developer program entitlement. But for now, you can just use your Apple account. Go ahead and click Add Account. In the popup, click Add Apple Account. That should get you going.

Click Next.

Let’s build our app for the first time

Xcode will then open up into its editing environment. This is where the magic happens. It can be overwhelming, so we’ll just focus on a few things first.

editing
Screenshot by David Gewirtz/ZDNET

There are three panes visible. On the left is a pane that lets you see your file structure. There’s a lot more you can do here, but we’ll just mention file structure for now. The middle pane is code. It’s where programmers write programs. The far right is the UI component browser, where the UI can be seen.

Notice the green arrow pointing to a right-pointing triangle. This is the Build button. When you click it, Xcode builds your app.

This template app is very simple. All it does is display an icon and the words “Hello, world.” But that means a lot is happening. To try it out, hit the Build button.

Also: I’ve tested free vs. paid AI coding tools – here’s which one I’d actually use

Here, you’ve got a lot more going on. The small iPhone is the user interface area, used to help define your UI. The big iPhone is the iPhone simulator, which is basically a virtual iPhone running your app on your computer. Until you start using hardware-specific features (like the camera), the simulator is a great way to go.

Also, as you can see, the app is running, showing a globe and “Hello, world,” corresponding to the code in the second pane.

simulator
Screenshot by David Gewirtz/ZDNET

Click the simulator menu bar (at 1) and the red close button (not shown, but you know what a red close button is). Then click the black square (at 2) to stop the app from running in Xcode.

Time to feel the vibes

You can use Apple’s Code Intelligence right from inside Xcode. When you do, Xcode will talk to Claude (or ChatGPT, if you chose that binding) to modify code in Xcode and then run it.

vibe
Screenshot by David Gewirtz/ZDNET

To do this, hit the AI star button (at 1). This changes the left pane from a file browser to an AI chatbot interface.

As proof of concept, we’re going to give the app some minor interactive capabilities. When the app is running, we want it to toggle between “Hello, world” and “Hello, David.” So, in the chat field (at 2), type:

Add a button that, when clicked, toggles between “Hello, world!” and “Hello, David!” Make sure it checks the current state and changes to the alternate state.

I guess, if you really had to, you could use your own name instead of David. Look at those two instructions. The first describes the intent (make a button and make the button toggle).

Also: How to actually use AI in a small business: 10 lessons from the trenches

But the second sentence is where thinking like a programmer can boost your success. We can’t assume that the message displayed is going to be known to the code. So the best way to make it work is to first ascertain what the current state is (“Hello, world” or “Hello, David”) and then work from that.

Hitting Return at the end of the prompt sends the AI on its way.

The AI has coded

Now, let’s look at the result. The leftmost pane shows the AI discussing the change and how it works. The middle pane shows more code. On top of the right pane, you can see the simulator, which is showing the text button “Toggle Greeting” and one of the text toggle versions.

final-app
Screenshot by David Gewirtz/ZDNET

If you’re curious, you can look at the generated code. The AI generated a bunch of lines of code, but the core code that does the toggling is this line:

Text (isWorldGreeting ? "Hello, world!" : "Hello, David!")

The text displayed is set to the value inside the parentheses. The ? : format is called the “conditional operator.” Basically, if the value to the left of the parenthesis (isWorldGreeting) is true, the value to the left of the colon is returned (in this case, “Hello, world!”). If the value of isWorldGreeting is false, the value to the right of the colon is returned (“Hello, David!”).

Also: Bad vibes: How an AI agent coded its way to disaster

With this one command, the AI took a 24-line program and added six lines. Sometimes the AI will change a line or two; other times, it will change or add hundreds of lines. It really depends on what you ask it to do. In addition to getting the AI to help create the app, you can often look at the code the AI generates to learn how it does certain tasks.

Sending to an actual iPhone

If you want to run your app on a real iPhone, the process is pretty much identical. You need a USB cable to connect your iPhone to your Mac. As long as your phone shows up in the Locations sidebar in your Finder (shown at 1), you’re good.

iphone
Screenshot by David Gewirtz/ZDNET

At the top of the Xcode screen is a little selection area (shown at 2). For the simulator, we used a virtual iPhone 17 Pro. But if you toggle that to your actual iPhone (as I did with the iPhone 16 Pro Max), when you hit Build, Xcode will send the app to your actual iPhone, install it, and open it.

Have fun!

We’ve come a long way in this article, from no programming at all to creating our very first iPhone app using AI coding. Have fun with it. Make stuff that’s cool. We’ll be back with more thoughts on AI programming in future articles.

Also: What Bill Gates really said about AI replacing coding jobs

Have you tried using an AI assistant inside Xcode or another IDE to help write code, or are you still relying on traditional methods? Do you think tools like this make learning programming more accessible, or do they risk hiding too much of the core knowledge? If you’ve experimented with AI-assisted app building, what worked well and what didn’t? Let us know in the comments below.


You can follow my day-to-day project updates on social media. Be sure to subscribe to my weekly update newsletter, and follow me on Twitter/X at @DavidGewirtz, on Facebook at Facebook.com/DavidGewirtz, on Instagram at Instagram.com/DavidGewirtz, on Bluesky at @DavidGewirtz.com, and on YouTube at YouTube.com/DavidGewirtzTV.

avots