ANTIGRAVITY LABJP
Articles/App Development
App Development/2026-06-27Advanced

Why Antigravity Agents Build Your Xcode Project Fine One Day and Break It the Next on a Synced Folder

Put an Xcode project inside a Dropbox-synced folder, hand it to an Antigravity agent, and builds start passing and failing at random. Here is the real cause — sync daemon versus build — and how to fix it with xattr exclusion and a conflict-copy preflight.

antigravity394xcode4dropboxios32automation65

Premium Article

One week, an Antigravity agent I run overnight started failing on roughly one run in three — same task every time. The logs showed a corrupted lockfile partway through pod install, or xcodebuild halting because a file that should exist could not be found. Running the exact same commands by hand worked every time, and the failure landed in a slightly different place on each bad run. When a failure refuses to reproduce and never lands twice in the same spot, the cause is almost always the environment, not the code.

I work as an indie developer with iOS apps on the App Store and companion Android builds on Google Play, and my project folder has lived in a Dropbox-synced setup across two Macs for years. Convenient — but it took me a while to notice that this sync is a poor match for unattended agent runs. The culprit was the sync daemon and the build touching the same directories at the same time.

The Same Command Passes and Fails on Alternating Days

The last thing to suspect is your own code or the agent itself. When the failure point moves around, never reproduces by hand, and clusters at certain times of day, suspect environmental non-determinism first.

On a cloud-synced folder, two processes fight over the same files:

ProcessWhat it doesDirectories it touches
Build (xcodebuild / pod install)Creates and deletes intermediates by the secondbuild/, Pods/, DerivedData/, .swiftpm/
Sync daemon (Dropbox, etc.)Detects changes and uploads / re-downloads themThe entire synced folder

The daemon starts uploading a file the build just wrote, the build overwrites that same file mid-upload, and the sync layer decides to keep both — producing a conflicted copy like Podfile.lock (Your Mac's conflicted copy 2026-06-27).lock. The next build grabs it and consistency falls apart. When you work interactively you rarely hit that exact instant, so it stays invisible. Run an agent many times a day, unattended, and the odds of landing on a conflict stop being negligible.

The Sync Daemon and the Build Are Fighting Over the Same Directory

The important point: this is not an Antigravity bug or a CocoaPods bug. Whatever agent and whatever build tool you use, the same race happens as long as you keep high-churn directories inside a file-sync scope.

The most fragile spots are metadata Xcode rewrites constantly such as .swiftpm/xcuserdata, dependency trees that get regenerated wholesale like Pods/, and intermediates like build/ or DerivedData/. All of these are "fine to disappear and be regenerated anytime," and there is no value in sharing them with another Mac. What you want to share is source code, not build debris.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
Learn to diagnose 'builds that fail at random' as a race between the sync daemon and the build, instead of chasing your own code
Take away a concrete recipe for excluding volatile directories (build / Pods / .swiftpm) from sync with xattr, including the Run Script that re-applies the mark after a clean build
Add a preflight that refuses to run the agent when conflicted copies are present, so unattended runs never grab a corrupted repository
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Antigravity Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

App Dev2026-05-16
Automating App Store Review Replies with Antigravity — Multilingual Workflow for a 50M-Download App
Real-world experience semi-automating App Store review replies across 8+ languages using Antigravity. Covers 30 reviews per session, the hidden 8-second rate limit, and tone guidelines that actually work.
App Dev2026-05-04
Swift Testing × Antigravity — Beyond XCTest to AI-Driven Test Design
A comprehensive guide to transforming iOS test quality using Swift Testing and Antigravity together. Covers @Test and #expect macros in practice, parameterized testing, async patterns, XCTest migration strategy, and AI-powered test generation.
App Dev2026-04-19
Building a Fully Automated iOS App Release Pipeline with Antigravity — From Screenshot Generation to App Store Review Management
Use Antigravity, App Store Connect API, and GitHub Actions to automate every step from build to App Store submission. A complete advanced guide covering AI screenshot captions, metadata optimization, and rejection analysis.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →