Building and Shipping Mac and iOS Apps Without Ever Opening Xcode (scottwillsey.com)

215 points by speckx 5 hours ago

codazoda an hour ago

One down-side to this is that it does require you to run the agent on your Mac instead of in a Sandbox. I do this too and there are lots of problems I can't solve in a sandbox. I know a lot of you are throwing your hands up at the years of security practices we're throwing out the window when we do that.

The fact that xAI uploaded someone's home directory, including their SSH keys, is giving me serious pause at my choices here.

Generally, I don't worry about my machine being "blown up". I don't have a TON of unreproducible stuff on my machine. Everything is backed up, committed to git, and the like. I can restore most of it in a couple hours.

That said, I really, really don't want my .SSH directory sent to an AI agent and it's silly to prompt your way around that. You need to block it at the system level. I'm considering a separate user and then 700 permissions on my home directory.

I feel like we're back to 1990's security here. The double-edged sword is that it's helping us get things done at a pace like never before.

I'm not throwing shade here, I'm among the guilty.

999_cirno 6 minutes ago

> require you to run the agent on your Mac instead of in a Sandbox

All recent Macs come with nearly zero perf cost virtualization. You can easily run Mac or Linux VMs assuming same architecture. Use it all the time for development and whatever.

Use Tart or VirtualBuddy, both open-source, for a packaged solution

More recently, there are also Apple containers [1]

[1] https://github.com/apple/container

gwking 26 minutes ago

I've been working on a wrapper harness that runs claude as a separate user named `agent`. I tried this about a year ago and couldn't get it to work because of OAuth and the keychain, but took another pass recently and claude had enough self-knowledge about recent changes to say we could do it with CLAUDE_CODE_OAUTH_TOKEN. It has required building a some tooling around permissions setup with ACLs but it works on macOS today.

In terms of risk, I see it as halfway between stock claude with the sandbox and full-blown container or machine isolation.

I was recently thinking that as Claude's own sandbox gets better I'm doubting the ROI on my belt-and-suspenders project, but your comment reminds me why I'm doing it.

It is not currently published open source but I'm happy to talk about it with strangers.

ghjnut 17 minutes ago

I've been running my agents in a docker sandbox that automatically mounts the current directory. It's been a bit of a pain to figure out and maintain the set of tools I provision into the sandbox- but it's fun to watch codex go to the ends of the earth trying to figure out solutions using nodejs (the only runtime).

pianopatrick an hour ago

You could move your SSH keys onto a password encrypted usb drive that you physically remove from the computer.

wrxd 23 minutes ago

An alternative is to use ssh keys stored in the Secure Enclave with tools like https://secretive.dev/

pianopatrick 11 minutes ago

colechristensen 20 minutes ago

Your sandbox can be a separate Mac user account.

You can also use native Mac VMs.

Many people have created Mac VM projects to do exactly this, I was working on one but was stalled too often because before I started using claude I bought a new laptop with what I KNEW was enough disk space.

The 100 GB or so I need to comfortably do the VM stuff just isn't available on my mac.

fragmede 39 minutes ago

On a Mac. Just get a Mac mini. It doesn't have to be a crazy big beefy one, and if you're selling apps, it's a justifiable business expense.

kxxx 3 hours ago

I've been building and testing my iOS app just for fun via Linux only.

Surprisingly, it's very easy. This works like a charm: https://github.com/xtool-org/xtool

You do not need to upload to TestFlight or the App Store; you can just install the app locally to your iPhone via usb -- even from Linux!

When in doubt, just ask your coding agent of choice to help you create and upload a Hello World iOS app. It's really easy.

amelius 5 minutes ago

Do the coding agents know about this tool?

sdicker 2 hours ago

I’ve been doing the same except that my linux installation is via WSL on Windows. I’ve been using sideloadly to move my IPA over to my phone. Works great.

GaryBluto 2 hours ago

Does the iPhone need to remain tethered if it is transferred via USB?

drakythe 2 hours ago

Dev apps need to be re-loaded every week (or two?) last time I did sideloading. The idea behind a dev app, in Apple's mind, is that it is for limited testing, so they have an expiration when not signed/installed through the App store.

gwking 12 minutes ago

I have one weird trick for people who are exploring this vein. I last opened an Xcode project about five years ago so I could be way behind the times.

Having spent many years fighting with Xcode professionally, I was thrilled when swift build came out, and then appalled at how badly Xcode adopted it. Eventually I realized that you can set up your entire app as a swift package, and then the Xcode project with a single main source file that calls some `app_main()` (or whatever you want to call it) function in your package.

I cannot remember exactly but there was something annoying about setting up a new project; I think by default Xcode assumes that you want a swift package to be treated as a dependency that is checked out from git, but there was a way to drag and drop a local dependency in the same project directory and then it worked.

What this buys you is that files are no longer tracked by Xcode, so renames/merges no longer trigger project.pbxproj surgery. Instead you specify the swift package directories and are done.

I used this for some large personal projects and was very happy with it.

At one point I also wrote my own build tool that imitated all of the steps that Xcode took so that I could truly be Xcode-free. That also worked (and was not even that hard) but I went back to Xcode because the debugger UI was better than what I could get out of VS Code at the time, and especially because I was playing around with the Metal debugger.

Tiberium 4 hours ago

It's kind of funny to be reading this:

> I had Claude Code create mine: I told Claude, more or less: I want to archive, Developer ID-sign, notarize, staple, and install this app to /Applications without ever opening Xcode. Write me a script that does the whole chain and fails loudly if any step breaks.

Even though the text we're reading is Claude talking to us as well :)

Also it was weird to see the mention of "ask your LLM" at almost every stage in the blog post:

> point Claude Code or your LLM coding tool of choice to this blog post, and let it figure it out

> When in doubt, ask your LLM of choice about them and have it help you get set up. It’s the one that’s going to be using Xcode for you anyway.

> The whole point of using the LLM in the first place is to avoid doing things manually that you don’t want to do.

> Again, if in doubt, ask Claude Code or your LLM of choice to create this for you.

> Again, this is why you talk to your LLM, tell it what you want, and have it help build your workflow.

ryandrake 4 hours ago

Claude telling us to point Claude to a web site written by Claude so that we can use Claude to create a build environment...

ericol 3 hours ago

yo dawg

natpalmer1776 3 hours ago

theParadox42 3 hours ago

… that Claude can use, because Claude can’t use the XCode gui very efficiently.

carimura an hour ago

"Claude was the only LLM to survive the LLM Wars."

quasarj 27 minutes ago

The mistakes in the text made me doubt it was AI, but who knows, maybe it's doing that on purpose now

CharlesW 4 hours ago

If it's okay to mention my own complementary open source project, Axiom¹ does a good job of helping coding harnesses know how to do this effectively for Apple OS development.

In addition to a deep roster of skills and agencts, Axiom includes several for-LLM tools². xclog, xcprof, xcsym, and xcui are designed to be used by LLMs, and expose capabilities in a token-efficient way. These tools are equally helpful for non-Axiom skills/agents.

¹ Axiom: https://charleswiltgen.github.io/Axiom/ ² Axiom CLI tools: https://charleswiltgen.github.io/Axiom/tools/

lprd an hour ago

Silly question, but do you reckon it'll function decently in a Kotlin multiplatform codebase? There's swift native code, but I'm not sure how it would perform with some logic being shared.

CharlesW 16 minutes ago

Not silly at all. For Compose Multiplatform, Axiom won't do much for code review or generation. It might be useful for operations on the built app: console capture, crash symbolication, simulator UI/accessibility driving, CPU profiling, plus the whole shipping layer (signing, privacy manifests, submission).

smashah 34 minutes ago

Use axiom all the time thanks for your work. The next frontier in iOS app tooling is self-hostable Linux based build server. Thoughts?

CharlesW 9 minutes ago

Sounds very intriguing! Please reach out (see my profile) when you're ready to share more.

semiquaver 4 hours ago

Axiom is excellent, thanks for making it!

CharlesW 38 minutes ago

I'm glad that it's been valuable for you!

zuzululu 3 hours ago

will it work with flutter ?

CharlesW 2 hours ago

Axiom covers only native APIs and tools, but the Flutter team maintains what looks like a nice set of skills at https://github.com/flutter/agent-plugins, and the Dart team at https://github.com/dart-lang/skills.

ChrisMarshallNY an hour ago

Technically, you are using Xcode.

Xcode is a [buggy as hell] GUI wrapper for a lot of system-level UNIX utilities and apps [which are generally, not so buggy].

Using CLI to release apps is a pretty old practice; at least as long as I've been doing it (I released my first Xcode app in 2012).

quasarj 26 minutes ago

That's good to hear. I never even tried to make anything for macOS because I opened Xcode and.. well, you know.

franze 12 minutes ago

built cable detective like this https://apps.apple.com/at/app/cable-detective/id6765963737?l... and the soon to come https://aifcc.franzai.com/ which is more ambitious

honestly would not even know what to do / click in xcode

supermatt 4 minutes ago

> Without Ever Opening Xcode

"Next, open Xcode"

waynecochran 18 minutes ago

The main iPhone app I maintain for work is 100% claude edited now ... I don't touch the code anymore ... I do occasionally look at it. It does a way better job than I could. I do have Xcode open as claude does its thing ... and I occasionally sign and deploy with Xcode. No coding though.

tomaskafka 22 minutes ago

I find it hard to believe xcodegen is in a state where it would reliably generate xcodeproj for all edge states (widgets, watchos app, notification extensions …) - it certainly wasn’t when I last tried it for Weathergraph few years ago.

That said, it might be well enough for simpler apps.

tptacek 15 minutes ago

What's a not-simple app? I've had Claude generate:

* A Markdown viewer (obviously pretty simple)

* A menu bar Apple TV remote (surprisingly complicated)

* A menu bar and desktop temperature tracker for the silly Tapo temperature trackers I have all over my house (a little complicated because multiple user interfaces, a backing database, scheduling, and multiple local/remote protocol interfaces)

* A graphical CAS calculator frontend to Sage Math with LaTeX math rendering

* An LLMwiki implementation that uses macOS filesystem extensions to reflect a SQLite database into a local filesystem for agents to traverse (basically the new macOS way to do FUSE, fussy enough that the app has to run out of /Applications to work)

* An agent-driven Music.app replacement with AirPlay streaming support managing Apple Music catalogs and tracks

All of these have worked without me ever once touching the xcode UI, except one time to generate Apple Developer certificates, which I then drove exclusively from CLI tools.

These are all pretty modern SwiftUI applications.

mvkel 2 hours ago

In my experience, the better long-term choice if you're going to vibe code an app is to use Expo.

Its basis is React, so the code output quality is much higher than Swift because there is much more React code in LLM training data.

Everything is in the command line, and debugging is a breeze because it's a web view. But once it's compiled to native iOS, it feels like any other native app.

Expo + Fastlane = fully automated iOS submission and deployment. I issue one command and see a new version in the App Store.

hetspookjee 2 hours ago

Some parts when creating a new app cannot be automated right? Eg registering the app itself for example.

fragmede 36 minutes ago

You can have your AI agent use computer-use to click around on in a browser open on developer.apple.com if that's counts as automated to you.

theraven 2 hours ago

Interesting this is coming across as novel. This is how CI build machines for Apple’s platforms have been setup in perpetuity.

coverband 2 hours ago

Regardless of the vibe coding aspect, there's good information here for anyone new to the mac/ios build/distribution workflows.

hyzyla 2 hours ago

Check also Sweetpad CLI. It’s basically wrapper around xcodebuild, but humans and agents. It’s my next project after Sweetpad VSCode extension for developing iOS/Swift applications in VSCode. Cli is still in beta, but I see on my own project that it’s already quite pleasant to use

1. https://sweetpad.hyzyla.dev/

2. https://github.com/sweetpad-dev/sweetpad

awaseem 31 minutes ago

I’ve done this forever on Foqos. Have a makefile, never even open Xcode and the instructions are in the agents md

dools an hour ago

Shout out to fastlane! I would have loved to have found it sooner in my app shipping journey.

Schiendelman 4 hours ago

I've been using essentially this process (with Claude Code) for about six months. There are a couple of places where I've opened xcode; mostly to update the simulators for new betas of xcode 27, and once to add a target for Apple Watch (and I think something for HealthKit).

Interestingly, since about Opus 4.6, Claude has been able to reason its way into this process on its own. It was clunky until 4.7, and in 4.8 it's managed to find its way around every reason I had to open xcode myself.

pzo 2 hours ago

You can as well make it simpler and use those skills:

https://github.com/software-mansion/argent

or

https://github.com/callstack/agent-device

both callstack and swmansion are mostly react native shops but those should work even in native ios/android as well

schainks 4 hours ago

I just set up my pipeline to do this exact thing for both the Apple and Android ecosystems, dispatching loads to my mac studio or Linux box accordingly. I moved the runners off GitHub because uptime for GitHub actions has been trash lately, and the Apple Silicon runners are pricey.

Claude was great at figuring out what was broken when and either fixing it, or clicking as far as it could until it needed me.

You could say I'm mostly just IRL hands for the AI now.

isodev 2 hours ago

In addition to the challenged Xcode, just using Swift seems to require a lot more tokens for both coding and dealing with build/platform quirks. Probably not super significant on indie scale but for anything more robust, it builds up quickly.

React Native and Flutter seem to be much more predictable for the bots (and more fun for humans, since they have actual hot reload).

grahar64 an hour ago

I thought this would be a flutter post. Love flutter, ... , well I like flutter compared to Kotlin and Swift

busymom0 9 minutes ago

Last I used flutter, editable text views was where it wasn't acceptable for me. On iOS, the default text view comes with a lot of built in stuff automatically such as cut copy paste, lookup definition, translate etc. Flutter's didn't have these.

saagarjha 3 hours ago

Making your app buildable from the CLI is not something I do personally to use on my Mac but it is very useful when you're automating your CI. If you have GitHub Actions set up to build your app, so can Claude, assuming you have the right signing setup on your machine.

mulmboy 2 hours ago

I went to build an open source app from GitHub and was pretty surprised that it requires Xcode and that Xcode can't really be installed without an apple id. I do not want to make one and I certainly will not sign my computer into one.

I did end up somehow installing Xcode via some shady download and was on my way. But the whole ordeal left a very sour taste.

swiftcoder 2 hours ago

Running a Mac without an Apple ID feels like an exercise in masochism. I wasn’t aware one could even still it through first run without

xyzzy_plugh an hour ago

Why do you need one?

everfrustrated 2 hours ago

Heck you can't even compile against many of the Mac APIs without a cert unlocked by a paid developer account.

sneak 2 hours ago

Though the primary way of installing Xcode is via MAS (requiring Apple ID login), Xcode can be downloaded from the Apple Developer website without an ADP membership, though you do have to log in to the website with an Apple ID. You don’t have to log into the Mac with an Apple ID though, you can then install and use it on a Mac without an Apple ID (though you will need one inside Xcode to sign apps to get them to run on an iOS device).

recsv-heredoc 4 hours ago

Having to have Xcode installed is more than half the problem. It makes Visual Studio look lightweight.

ryandrake 4 hours ago

Xcode does have (or had, haven't checked for a while) a lightweight "command line tools only" installer. Unfortunately, that installer omits a lot of the actual useful command line tools, like the notary and stapler tools. I also recall that the command line tool only installer leaves out things like the metal compiler, too. Not sure what the point of it is.

dylan604 3 hours ago

> Not sure what the point of it is.

My only familiarity with it is because it's needed by brew. I honestly never looked into exactly what is in the package, but I assumed things like what is installed with -devel packages of yum/apt-get/dnf/etc. Lots of repos have common list of things to install like gcc/make/etc. Again, just guessing, but it's one of the first things I've always run on a new Mac to get it usable for CLI usage.

saagarjha 3 hours ago

It lets you build basic UNIX-like tools.

gumby 4 hours ago

It’s mostly all the emulators and platform APIs.

I’m not defending Xcode (I hate it), just clarifying.

mrbombastic 4 hours ago

This is cool but also makes me worried about the tendency with llms for all of us to make bespoke solutions rather than building a better community tool or extending an existing tool to solve the problem. fastlane exists to solve exactly this problem in the mobile space.

ryandrake 4 hours ago

Also, shell scripts as part of a build are usually a little worrying. I'd at least want the build steps to be all integrated into my Makefile or CMakeLists.txt

doug_durham 3 hours ago

The llm is the better community tool. The important change is that you don't have to settle with someone developing a monolithic tool that happens to do what you need it to do. That was the way things used to need to be done because of the cost.

vl 3 hours ago

Bespoke solutions are better in many cases. They do exact things required for the project without taking extra dependency. Reducing dependencies is beneficial, because dependencies require management. So with llms economy of taking dependency shifted.

SoftTalker 2 hours ago

... avoiding this problem: https://xkcd.com/974

pupppet 3 hours ago

Doesn't that mean you need to distribute the app (TestFlight) before you can preview your app? How do you test locally without the simulators?

simonw 3 hours ago

For a macOS app you don't need a simulator. For an iPhone app I've seen Claude Code launch the simulator without me needing to open Xcode.

nwienert 3 hours ago

I built an iOS simulator simulator, though only for RN. Runs in browser but covers 100% of the API of RN, iOS UI, and the top 1k native libraries basically now. Been an ongoing agentic experiment of mine that's about ready to release.

Kind of fun, you can develop iOS and Android both without a build step and without a Mac even.

turtlebits 3 hours ago

Testing != Distribution. You can run directly on a connected iOS device, without setting up anything related to the app store.

datadrivenangel 2 hours ago

I've built a few small MacOS dock widgets now by just telling Claude/OpenCode to build them. Works well enough if you're very explicit.

The most useful one is a little weather sparkline to show local temperature forecasts. Useful every day.

josefrichter 2 hours ago

Wait, I am not aware that I've done ANY of those setup steps, yet I'm building iOS and macOS apps without XCode. Both Claude and Codex handle it just fine and didn't ask me for any setup steps.

stephenhuey 3 hours ago

Thought this was going to be about the new Ruby Native!

https://rubynative.com

“From bundle install to your phone in minutes. To the App Store and Google Play without a line of native code.“

zuzululu 3 hours ago

holy hell $299/app is wild

incanus77 3 hours ago

One time?! That's amazing.

stephenhuey 2 hours ago

chrisweekly 2 hours ago

tdhz77 2 hours ago

I do something similar in GitHub actions. Every new app is setup in a few minutes to star getting rejected by iOS and Android.

hyperhello 4 hours ago

Being outside of the approved development loop has rough edges. How do you keep the app from putting up that permission to access documents folder all the time while you rebuild it?

saagarjha 3 hours ago

They're a paid developer, so they are probably signing the app with a stable identity that avoids this.

overgard 3 hours ago

Oh god, the app store does not need more slop. If you can't be bothered to open XCode (which I agree is a dumpster fire, but), you shouldn't be bothered to submit an app that a person has to review and another person has to filter out of their search results.

pclowes 39 minutes ago

Counterpoint: XCode is such slop that an app made by a developer with the taste to avoid it has a higher probability of being less "sloppy" than average.

sgt 4 hours ago

Although this has been well known for years and documented.

dylan604 3 hours ago

Yeah, but not only was this "on a computer" but "with an AI" so it's not the same at all. /s

exographicskip 3 hours ago

Skimmed the article. Pretty close to my workflow using fastlane with tauri.

Useful sanity check!

murlax 2 hours ago

Tangentially, I despise Xcode and love the Expo ecosystem and all the lovely tooling that they have built. It is React Native but Expo honestly makes it so trivial to build stuff from the CLI without ever needing to open that abomination of an app. And with AI, I have built a lot of side project apps onto my iPhone, like a homelab app for monitoring my cameras with push notifications whenever someone is at the door, starting my irrigation and a whole lot more. Plus Tailscale of course. Kind of a crazy world that we live in now.

sefrost 2 hours ago

Yes, I remember React Native being quite painful before Expo!

Upgrading from one version to the next especially so.

Expo seems to shield you from a lot of issues, without really taking any power away from you either.

LatencyKills 4 hours ago

I spent seven years as a dev on the Xcode team and this is pretty much my exact workflow these days.

sneak 2 hours ago

You still have to open Xcode (to get the certs), and you still have to accept the Xcode EULA. Title is quite misleading if not outright false.

embedding-shape 3 minutes ago

As someone who tried my very best to not open Xcode for building and shipping Mac and iOS apps, I agree, there are things there are literally no way around opening the GUI, not even terminal utilities for. You cannot do this 100% headless, which is what I attempted at first.

rvz 3 hours ago

By using "Claude Code"*

* and giving Anthropic all your secrets, env vars, certificates and your source code to them.

datadrivenangel 2 hours ago

I've used opencode on a plane with local models to make small updates to local MacOS apps. It's not fast or amazing, but it does work well enough to do trivial changes.

But also yes this is a real concern.

simonw 3 hours ago

What bad things to you anticipate Anthropic doing with your secrets, env vars, and certificates?

kstenerud 3 hours ago

Not if you've got a good sandbox.

saagarjha 3 hours ago

Do you have one?

kstenerud 3 hours ago

Danox 3 hours ago

What could go wrong? Might Apple change something across five ecosystems and leave you in the lurch, and now you have to go through all the slop to try to fix it?

onesandofgrain 2 hours ago

Don't make apps for iOS. The apple ecosystem is horrendous