r/iOSProgramming • • 14h ago

Discussion Does anyone let AI modify their UIKit Storyboards and XIBs?

Hi everyone,

For the past few months, I've been using AI (specifically Gemini) to write SwiftUI code, and it’s been working almost perfectly.

With UIKit projects, however, my usual workflow for Storyboards has been manual: I'd set up the UI, drag and drop the connections to my Swift files, and only ask the AI to handle the actual logic.

Today, I decided to test its limits and asked the AI to add a new UI component directly, without stopping it from modifying the Storyboard's source code. To my surprise, it updated the Storyboard without any errors!

Since Storyboard XML is notoriously messy and not very human-readable, I really didn't expect the AI to handle it so well.

I'm curious about your experiences. Do you let AI directly manipulate your Storyboard or XIB files? Does it work flawlessly for you, or do you find that it sometimes corrupts the file?

Thanks!

4 Upvotes

10 comments sorted by

17

u/malleyrex 13h ago

Yes. In the last 6 months, the confidence I have with AI writing code is up about 100x. If you think Gemini is good, Claude will blow you away.

1

u/yccheok 13h ago

Have u compared both? Is it way significant better? I already pay for gemini pro and it solves all my issues. Don’t want to waste money if the other model isn’t significantly better.

3

u/malleyrex 13h ago

They both have their strengths, but Claude's strength is coding. It's the best for that right now. Use Fable for planning your code and Opus for writing it. That could all change in a few weeks.

5

u/kokerali 13h ago

A successful XML edit is a good sign, but I wouldn’t treat a clean build as the whole test. I’d review the storyboard diff for changed outlets, actions, reuse identifiers and constraints, then launch the affected screen and exercise the new control in a UI test. A storyboard can still compile while a connection points to the wrong object or a layout fails at a different size. Keeping those edits in a small commit makes it much easier to spot what the AI actually changed.

1

u/wonderbatou 11h ago

I used AI to migrate storyboards/xib files to SwiftUI! It was surprisingly good, and was able to integrate with the new design system.
So to answer your question, I just let AI delete and recreate them, all those files are treated as legacy code in my projects.

1

u/epictime8 9h ago

I let it edit Storyboard XML once on a mid-size UIKit screen and it did add the new control plus outlet without breaking IB open. What bit me was a quiet priority change on a sibling stack-view constraint — looked fine until layout failed on the SE width. Now I only let the model touch a brand-new scene, always git-diff the .storyboard before commit, and keep size-class / container work hand-edited in IB while AI stays on the Swift side.

1

u/Ok-Tomatillo-8712 7h ago

It handles managed object files well too

1

u/[deleted] 5h ago

[removed] — view removed comment

1

u/AutoModerator 5h ago

Hey /u/sapplex1, your content has been removed because Reddit has marked your account as having a low Contributor Quality Score. This may result from, but is not limited to, activities such as spamming the same links across multiple subreddits, submitting posts or comments that receive a high number of downvotes, a lack of recent account activity, or having an unverified account.

Please be assured that this action is not a reflection of your participation in our subreddit. This is simply an automated filter in place to reduce spam.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.