You are currently viewing How I Built a New Feature for FlexiBackup Using Cursor + Claude 3.7 Sonnet

How I Built a New Feature for FlexiBackup Using Cursor + Claude 3.7 Sonnet

Hey there! It’s been a while since my last article. I’ve been busy building my indie app, and during this time, app development has changed quite a bit with new AI tools and coding methods emerging.

Today, I want to take you behind the scenes of my latest adventure: building a new feature for FlexiBackup with help from Cursor and Claude 3.7 Sonnet. But I’m not just going to throw source code at you and call it a day. Instead, I thought it would be more fun (and useful) to walk you through my thought process and show you how I navigated these AI tools to seriously level up my productivity.


The Backup Migration Feature

So what was I building? Something I think many FlexiBackup users will love: a feature that lets you quickly move your existing backups from your internal SSD to an external hard drive with just a few clicks.

Here is what this feature does:

  • Analyse all your existing backups and only move the latest backups while removing outdated ones.
  • Shows a summary of backups will be moved before starting the migration.
  • Displays a progress screen while moving the backups.
  • Shows how much space was freed after the migration.

Curious about what this looks like? Here’s a demo to show the feature in action:


My First AI Tool Experience, and I Was Impressed!

I decided this feature was the perfect chance to finally get my hands dirty with these AI coding tools everyone’s been discussing. Could they really be as good as people say? I had my doubts, but I was willing to give it a try.

My plan was simple: draft up a detailed requirements and then ask Claude to craft a prompt for Cursor to work with. After about an hour of writing and tweaking, I fed it into Cursor using Claude 3.7 Sonnet as the model.

And then I waited. Within minutes, Cursor had generated working code with zero compilation errors. The interface wasn’t pretty, but the feature worked flawlessly. I was genuinely impressed!

The following video showcases the result that I got:


How Good Was the AI-Generated Swift Code?

Having written Swift code for more than a decade, I was eager to see if the AI could actually code better than me. The overall quality wasn’t half bad, but there were definitely some areas that can be improved. Two main issues jumped out at me:

  1. Error Handling: The code was using the old-school optional NSError approach instead of Swift’s more elegant Result type. It worked, but it felt like code from 2018, not 2025.
  2. Async Operations: Instead of using Swift Concurrency, the code relied on completion handlers for background operations like analyzing and moving backups. Again, functional but not quite modern Swift.

When I asked the AI to update the code to use Result types, it nailed it, making exactly the changes I would have. But Swift Concurrency? That’s where things got flaky. The AI kept stumbling, creating code with compilation errors or logic problems. It especially struggled with keeping UI updates on the main thread, which is pretty crucial unless you enjoy watching your app crash or hang.

After several failed attempts, I decided to convert all closures to use the async/await syntax myself. This showed me that AI is not performing that well with newer Swift features, which is most likely due to the lack of training data.


Improving the Initial Backup Migration Feature

After the first round of development, the feature was about 80% complete. But two important pieces were still missing:

  1. The Cancel Mechanism: Some backups are huge, and migrations can take time. What if you change your mind halfway through? You’ll need a way to stop the long-running process.
  2. Smooth Progress Updates: If you had just one backup to migrate, the progress bar would sit at 0% until suddenly jumping to 100% at the end. Not exactly a great user experience. I want it to be a gradual progress that makes you feel like things are actually happening.

I tried the AI approach again, hoping for another win, but this time the results were… let’s just say less magical. The AI made changes that either broke existing code or caused the app to freeze during migrations.

Breaking Things Down and Guiding the AI

Just as I was about to abandon the AI approach altogether, a lightbulb moment hit me. Maybe the problem wasn’t the AI; maybe it was me asking too much at once! What if I broke down this complex feature into small tasks that the AI could handle more easily?

So, I reimagined the task list:

The cancel mechanism:

  1. Create a function that copies files one by one from the source to a temporary folder.
  2. Add Task.checkCancellation() after each file is copied to ensure users haven’t canceled the migration process.
  3. Once everything’s copied, move everything from the temporary folder to the final destination.
  4. After that, clean up by deleting the temporary folder.
  5. Lastly, add a button that users can use to cancel the file-moving operation.

Smooth progress updates:

  1. Create a function that returns the size of the source folder and temporary folder.
  2. Add a timer that checks the size of the source and temporary folders every second. After that, calculate the progress by comparing their sizes.
  3. Update the UI to show the latest progress each time the calculation finishes.

I wrote a simple prompt for each small task and fed it to Cursor. Breaking things down into smaller, more focused tasks suddenly made the AI useful again! The code it generated wasn’t perfect, and I still needed to make some tweaks here and there, but the heavy lifting was done.

The biggest challenge for the AI is still Swift Concurrency. I wanted the app to use AsyncStream instead of closures to update the UI about the migration status. But in the end, I had to manually update the code to get things working.

Overall, the AI tools reduced my development time by about 70%, which is pretty significant. 👍🏻


A Very Useful Documentation Trick

Here’s a really useful trick I’d like to share with you: AI is actually amazing at writing README files for your projects.

One approach that’s worked really well for me is using the README file as context when talking to AI during development. It helps keep everything in the same context.

Using README as context in Cursor
Using README as context in Cursor

After you finish each development phase, you can simply ask the AI to update the README with your new changes. This updated README can then serve as context for your next development cycle, creating a smooth workflow where your documentation evolves alongside your project.


Final Thoughts

After this whole experience, I can confidently say that AI won’t be replacing developers (at least for now). I think of it more as having a super-helpful junior dev who can write code at lightning speed but sometimes needs guidance on the more complex stuff.

You definitely still need technical knowledge to work effectively with these tools. It’s less about being replaced and more about having a handy new tool to level up your development workflow.

AI still struggles with tasks that require deep analysis of existing code or complex logic. It shines brightest when building new, standalone features rather than digging through the complicated legacy code.

But you know what? I’m genuinely excited about where this is all heading. While AI has taken over some coding tasks I used to enjoy, it’s opened up possibilities I never thought were in reach for me as a solo developer. I can now build more, faster, and that’s pretty amazing when you think about it.

So, what’s your story? Have you started playing around with AI coding tool? I’d love to hear how it’s going for you! 😃


👋🏻 Hey!

While you’re still here, why not check out some of my favorite Mac tools on Setapp? They will definitely help improve your day-to-day productivity. Additionally, doing so will also help support my work.

  • Bartender: Superpower your menu bar and take full control over your menu bar items.
  • CleanShot X: The best screen capture app I’ve ever used.
  • PixelSnap: Measure on-screen elements with ease and precision.
  • iStat Menus: Track CPU, GPU, sensors, and more, all in one convenient tool.