AwakeMate AwakeMate

🔨 Build tool

Keep your Mac awake during Xcode builds

A clean build, an archive, or a full test run can take longer than your sleep timer. AwakeMate watches for Xcode's command-line builder and keeps your Mac awake until it finishes.

Download for macOS Buy AwakeMate

Free 14-day trial · one-time $39.99 · no telemetry · macOS 13+

When your Mac sleeps mid-Xcode

Archiving a release or running a long test suite leans on the CPU for minutes at a time with no keyboard or trackpad activity. macOS reads that quiet as idle and drops to sleep, killing the build partway through codegen, linking or a Run Script phase. You come back to a half-finished archive and start the whole thing again.

AwakeMate keeps it awake while Xcode runs

AwakeMate recognises command-line builds by their process name, xcodebuild, which is what fires for CI runs, fastlane lanes and archive jobs. No project changes and no permissions: it just sees the builder start and keeps the Mac up.

Detected process: xcodebuild

Tip: turn on "Sleep when tools go idle"

Xcode builds are bursty: heavy CPU through compilation and linking, then nothing. With idle-sleep on, AwakeMate holds the Mac awake while xcodebuild is actually working and lets it sleep the moment the archive lands, so an overnight CI run does not keep the machine up till morning.

Get the most out of it

More questions about Xcodetap to expand

Does this work for archives and CI jobs?

Yes. Archives, test runs and CI lanes all invoke xcodebuild, which is exactly what AwakeMate watches for. The Mac stays awake until the job exits.

Will it change my energy or battery settings?

No. AwakeMate uses the same gentle IOKit power assertion as macOS's built-in caffeinate. It blocks idle sleep only and never touches your energy preferences.

Does it keep the Mac awake when no build is running?

No. Once xcodebuild exits, AwakeMate releases its hold and your normal sleep behaviour returns.

What's the best way to keep my Mac awake during a long Xcode build?

Let AwakeMate do it automatically. Add the xcodebuild process to your watchlist and it holds the Mac awake the moment a build, archive or test run starts. With "sleep when tools go idle" on, it powers through the compile and then lets the Mac sleep once the build lands, so you never babysit a sleep timer.

Should I just run my build with caffeinate instead?

You can - caffeinate -i xcodebuild ... works fine for a single command. But it is manual and all-or-nothing: you have to remember to wrap every build, it holds the Mac awake for everything until the command exits, and it has no idle-aware sleep or notch status. AwakeMate automates the same IOKit assertion per build tool and, with idle-sleep on, lets the Mac sleep the instant the build finishes.

Why does my Mac keep falling asleep in the middle of a compile?

Compilation and linking are CPU-heavy but never touch the keyboard or trackpad, so macOS reads the quiet as idle and starts its sleep timer. AwakeMate watches for xcodebuild and blocks idle sleep while it runs, without changing any of your saved energy settings.

Will it keep my Mac awake for Xcode with the lid closed, even on battery?

Yes. Turn on "Keep awake with the lid closed" in Settings - Options and approve the one-time helper; AwakeMate then keeps the Mac awake with the lid shut while Xcode runs, and dims the built-in screen so it is not draining the battery under the lid. It works on most Apple Silicon Macs (Apple forces sleep on some, so close your lid once to confirm). It works on battery too, but real work drains it faster, so keep it on power for long runs. See how it works.

Keep your Mac awake - exactly when it should be.

Free 14-day trial. One-time $39.99, no subscription. macOS 13+.

Download for macOS Buy AwakeMate