Follow ZDNET: Add us as a preferred source on Google.
ZDNET’s key takeaways
- Vibe coding works best in tiny steps, not big specs.
- Persistent AI documentation eliminates re-ramp time.
- Git, backups, and exports are critical safety nets.
This is not my first vibe coding rodeo. I previously did a project using OpenAI’s Codex with great success. But it was a project of a different scope. That was adding new add-on modules for a WordPress plug-in. This is using Claude Code to build an entire, complex iPhone application from scratch.
Also: 10 ChatGPT Codex secrets I only learned after 60 hours of pair programming with it
In this article, I’ll share with you 10 lessons that came from the two-week period during which I did most of the coding on my iPhone app. If you want to learn more details about the app itself, feel free to point your browser to this article.
As a super-quick background, my app uses NFC tags and photos to help me manage 3D printer filament in my Fab Lab. It tracks 100+ spools across 20 storage shelves, eight machines (with 26 individual spool holders), and another five or so work surfaces. It’s designed for a super-fast workflow so if a spool moves from one machine or location to another, the database can be updated with a simple tap of my iPhone on the spool and the destination.
Only one of these tips is Apple-specific. The rest of them apply to vibe coding with Claude, regardless of platform. And with that, let’s get started.
1. Code in baby steps
In my previously mentioned 10 Codex secrets article, I talked about why I didn’t follow the often recommended best practice of creating a product requirements document and then feeding the full spec to the AI.
If anything, I am now much more convinced that feeding an entire specification to the AI at once is an absolutely bonkers idea. The last thing you want an AI to do is take a 20-page document and create 20,000 lines of code, all of which you have to dig through, test, and confirm interactions. The idea sounds good on paper, but it will make for incredibly problematic products.
Also: How to install and configure Claude Code, step by step
Instead, feed one small step at a time to the AI. In my case, I started by simply getting the AI to read an NFC tag and report its contents. That was one of the two big hurdles I saw in the project, because that was wholly iOS-specific coding.
Once it could read the tag, I had it write a tag. Then I checked to see if it could read a previously written tag. Then I added the ability to take a photo. Then I added the ability to discard a just-taken photo. Then I added the ability to save a photo.
At no point in the early steps did I give the AI instructions about the overall vision of the product. But once we had these pieces working, we could move on to more. The benefit of this approach is that I could exhaustively test out each new capability or feature, and tweak it with Claude until something actually worked.
2. Instruct Claude to take notes
Probably the most valuable tip I could possibly give you is the workflow I adopted at the end and beginning of each session. Early on, I told Claude to create documents to notate the learnings that came from enabling the NFC capabilities. This was necessary, because it failed on its early tries, but then figured it out. I wanted it to remember what it had figured out.
This practice was extended to my final command at the end of each session. Whenever I finish a session with Claude, whether it’s a two-hour session or a 15-minute session, I tell it to document everything we did, record everything we learned, and keep track of what we need to do next. I tell it to do so in such a way that both I and the AI can understand comprehensively what was learned, what decisions were made, and what our next steps are.
Also: The best free AI for coding in 2025 – only 3 make the cut now
The content (architecture patterns, migration system, UI design, and so on) recorded in .MD files was built up over all our sessions from those explicit requests. Each time I asked Claude to record progress and notes, it added whatever seemed important to preserve, whether that was new patterns, decisions we made, or workflows that we discovered.
This is not automatic behavior. The CLAUDE.md file (along with other .MD files) has grown into a comprehensive project guide because of my prompts to do so. In fact, Claude’s default behavior is to never proactively create documentation files (this is actually in its system instructions).
At the beginning of each session, I tell Claude to review the code, review all the docs, and come up to speed on all the notes. Then let me know what we did last time, where we are, and what it thinks we need to do next.
It took me a while to realize it, but this practice resulted in this next, very unexpected lesson (and benefit) of vibe coding with Claude.
3. I was able to eliminate the come-up-to-speed time
For me, this was huge. I don’t program full time. Instead, I get small blocks of time between all my other responsibilities. For years, my biggest challenge was getting back up to speed.
Basically, for me, coding meant having to have the entire architecture of the project in my head, being fully aware of the programming language, understanding all the issues, and then writing code for the next capability.
The problem is that I’m often away from the code for weeks or months at a time, paying the bills. I might have wanted to dip into coding for an hour or so on the weekend, but because it would often take me a day or two to come back up to speed on a project and re-learn everything, I couldn’t take advantage of those few hour-long gaps in time.
Also: Why AI coding tools like Cursor and Replit are doomed – and what comes next
Instead, I had to wait until I had a free three- or four-day block, which only happens a few times every year. Needless to say, forward movement on my coding projects was fairly slow.
But with vibe coding and my practice of making Claude document everything, I can work on my project even if I only have a 30-minute block of time. I ask Claude to come up to speed, which takes about five minutes. I can read our updated notes, give it a prompt, tell it to record its progress, and move on.
Unlike my previous projects, where I needed blocks of time, my new iPhone app was coded over a 17-day period, in one- or two-hour chunks. I’ve left it for a few weeks and come back to it, and have been able to continue working on it. For me, this is game changing.
4. Compacting means it’s time to end a session
Claude does a process called “Compacting,” that allows it to compress and index the tokens in the current session. The first time this happened, I got a notice that said “Compacting” with no additional details. Then, my interaction with the AI just stopped. It appeared to hang for about 15 minutes. I thought something had broken, but it was OK.
Also: You should still learn to code, says top Google AI exec – here’s why
The compaction process is initiated when Claude’s session reaches a complexity level where it needs to manage its token use. You can ask Claude how close it is to compaction if you want to be proactive. I do that sometimes. Most of the time, I realize it’s been a while when I get the compaction notice.
My advice to you (and the practice I’ve followed ever since my first notice) is to use the compaction notice as a bit of an alarm clock. Once it shows up, I wait until I can interact with Claude again, then tell it to record its progress and end the session.
If I have more to do, I start a new session and have it come up to speed. This works well, because the compaction process indicates that there will be cognitive issues moving forward unless Claude is allowed a refresh.
5. Use GitHub for insurance
Even if you’re a lone coder, as I am, you will eventually want to connect your project up to GitHub. In my Claude setup step-by-step article, I showed you how to set up that link. Once the link is in place, Claude can commit your work to the GitHub repo.
I like to create a new branch before beginning work on a new capability, work through that capability, and then merge that branch back into the main repo once I know the capability works. This is nothing new to programming. It’s a best practice for any kind of programming, not just AI-assisted work.
Also: Bad vibes: How an AI agent coded its way to disaster
I actually think it becomes more important when working with an AI, because you never know if the AI is going to do something astonishingly destructive just because.
To that end, there’s a corollary, which is make sure you back up your development machine. Since I’m also testing on my iPhone, I make sure I back that up as well. Once again, you never know if the AI is going to innocently do something enormously destructive, so having backups is good.
6. Build import/export capabilities early
If your project is going to use a lot of data like mine does, build an export and import capability into the application early.
Coding data import and export is a fairly straightforward process, but it can be time-consuming and tedious. As a result, many developers don’t code it into their apps unless the nature of the application absolutely requires it. But with AI coding, it’s no more work than adding any other capability.
In my case, once I started adding features to the app, especially searching and filtering features, I needed the data in place to see how it works. For me, those filtering features are key to the program. If, for example, I want to see all the blue filaments, I want them sorted and presented to me quickly.
Also: Coding with AI? My top 5 tips for vetting its output – and staying out of trouble
As it turns out, we (me and Claude) had to do a lot of work, with a lot of revisions, to get quick filtering. Having test data was critically necessary.
When the code goes wrong, as it inevitably will, you might have to delete the app and reinstall it. You don’t want to lose all the data entry you’ve done. So adding import and export capabilities is a big win.
Here’s a tip though: keep in mind that your internal data structures will change. It’s a good idea to also have the AI build in a data migration tool so that every time you have a new data structure, it updates the old data. Have it set up a data structure version, and keep updating the migration code along with the import and export code. Trust me, you’ll thank me later.
7. How to think about debugging
The AI will make some boneheaded moves. It’s guaranteed. But it also will write reasonable code that just doesn’t work quite right, especially in the Apple ecosystem. Making the Quick Move feature, which required multiple NFC scans tethered together in a sequence, was a tough project, requiring a ton of debugging.
After a while, the AI began to lose its way and I had to guide it. One of the key things I had it do was add internal logging, along with a way to copy that log from the iPhone into the terminal window on the Mac for Claude Code. I also had to tell Claude what to log, what to look for, and explain what I was trying to accomplish.
Also: 9 programming tasks you shouldn’t hand off to AI – and why
It does add value to the AI interaction to explain exactly what you want to do. For example, once I explained I wanted Quick Move for fast workflow, with a quick tap on a spool and a destination, it helped. But we kept running into a time-out issue.
It wasn’t until I explained that I might do a tap on a spool, then have to walk to a new destination and open up a machine (all of which takes time), that it realized it couldn’t just leave the default time-out settings. Instead, it had to bypass time-out settings entirely.
So, here are three main guidelines to keep in mind when debugging:
- The AI is quite good at debugging.
- The AI needs guidance on how to approach debugging, and how to gather the information it needs to diagnose a problem.
- The AI benefits from knowing the actual use case for which it is doing the debugging.
In my headcanon, I think of the AI as a very smart grad student who can do the job well, but needs constant guidance and clear instructions. That seems to work quite well, because I keep an eye out for points where it’s clear the AI just isn’t getting the memo and needs to be pointed back in the right direction.
A corollary to this lesson is simple. You need to test. A lot. Constantly. You, not the AI.
8. Organize your file structure
Claude can be a slob. It will create files all over the directory structure, with no regard for organization. Since it can read and parse everything, it doesn’t really care where the files are, as long as they work to build your app.
On the other hand, you and I are puny humans who need a logical structure to make sense of anything. Additionally, even if it’s not about making sense, just having a long stream of random files strewn about the project directory can make your soul ache. It did mine.
Also: I asked AI to modify mission-critical code, and what happened next haunts me
So early on, and then regularly throughout the project, I had Claude go through and restructure the directories, move files, and reorganize things. Keep in mind that each of these moves may require a refactor, modifying the code to understand the new locations.
So, don’t just tell Claude to clean up his room. You’ll have to tell Claude what directory structure you want, or interact with the AI to get suggestions. Then after each change, go through and test the resulting code.
Another tip: you can tell Claude to examine all the code and let you know if any doesn’t fit the current structure. It will do that, and it can catch things, but it’s neither 100% accurate nor 100% complete. So use it as a tool, but also verify every change.
9. Claude is not the boss of you
Every so often, Claude Code will get it in its head that it’s the boss. It will, instead of doing the work, tell you how to do whatever needs to be done. That might be file activities, or changing settings, or even writing routines as part of the project.
The thing will actually respond to prompts by giving you instructions on how it wants you to carry out the work. Do not give in to the robot.
Also: I got 4 years of product development done in 4 days for $200, and I’m still stunned
Correct Claude, tell it that you want it to do the work. It may argue (make sure you have a backup), but if you insist, it will actually do what you’re paying it to do.
Sigh. Robots, these days. Right?
10. Use Swift and SwiftUI
Swift is Apple’s open-source language for building applications for the Apple ecosystem. SwiftUI is the related tool for building the UI components on those apps. While there are some other tools you can use to build iOS and other Apple ecosystem apps, I strongly recommend you start with pure Swift and SwiftUI.
Also: Claude Code makes it easy to trigger a code check now with this simple command
The reason is that this approach allows you to extend your iPhone app to other platforms. For example, you could move the iPhone app to the Mac, not as an emulated or simulated app, but as a native Mac app that shares some of the logic, but separates out the UI to be more Mac-centric.
Because I built my app in Swift, it may well be practical to use much of the existing codebase if I eventually want to make a native Mac app or an Apple Watch app.
What about you?
Have you tried vibe coding an app or substantial feature with an AI like Claude Code or ChatGPT Codex? What parts of the process worked well for you, and where did things break down?
Also: I’m an AI tools expert, and these are the 4 I pay for now (plus 2 I’m eyeing)
Do you agree with the idea of working in very small steps rather than feeding an AI a full spec? How do you handle documentation, version control, and debugging when an AI is doing most of the typing?
And if you’ve built for Apple platforms, do you think Swift and SwiftUI are the right foundation for AI-assisted development, or have you had better results with other approaches? 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.












