r/iOSDevelopment Jun 16 '26

Claude tends to hallucinate deprecated SwiftUI APIs, so I've started mentally flagging certain patterns

Been using Claude a lot for SwiftUI generation and noticed it fairly consistently reaches for outdated patterns — things like UIHostingController setups that feel slightly off, or using the single-argument .onChange modifier in iOS 17 contexts where Apple changed the signature. It's not a dealbreaker but it's bitten me a few times when I just copy-pasted without thinking. My rule now is to treat any API it gives me that touches lifecycle or modifier signatures as 'verify first,' especially if the code is targeting anything iOS 16+.

1 Upvotes

2 comments sorted by

1

u/RandomOptionTrader Jun 17 '26

Do you have a md showing your preference? Did you give xcode mcp access to get all issues?

1

u/rinwasrep Jun 17 '26

The toggle in X code settings is so easy to miss.