Essential rules for iOS development with AI agents to prevent common issues and improve productivity.
Never let AI modify .pbxproj files. Create files with agents, add them to Xcode manually. One corrupted project file will waste hours.
Document platform gotchas immediately. Hit an iOS 26 API issue? Add it to AGENTS.md that session. "NO .background() before .glassEffect()" saved me from repeating that mistake 50+ times.
Use feature flags for experimental code. Toggle new features on/off without rebuilding. Makes rolling back instant when something breaks at 11pm.
Always request debug logging. Ask agents to add Logger statements for complex flows. Future you will thank past you when debugging async camera issues.
Test after every change!! Clean build folder (Cmd+Shift+K), run on device, verify in console. Catch issues before they compound.
Keep conversations focused on single components. Don't ask to "refactor the whole app" Smaller scope = better results.
Document what changed in session. End every major change with a markdown file explaining what broke, how it was fixed, and rollback steps.