Top
Best
New

Posted by speckx 5 hours ago

Building and shipping Mac and iOS apps without ever opening Xcode(scottwillsey.com)
255 points | 116 comments
codazoda 1 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 1 hour ago||
> require you to run the agent on your Mac instead of in a Sandbox

You don't have to! 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 [1] or VirtualBuddy [2], both open-source, for a packaged solution. Or in the spirit of this post, vibe code your own wrapper around the OS API [3]

More recently, there are also Apple containers [4]

[1] https://tart.run/

[2] https://github.com/insidegui/VirtualBuddy

[3] https://developer.apple.com/documentation/virtualization

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

theredleft 36 minutes ago|||
I run my AI headless in a docker container and give it access to git – it can only contribute code - when it needs a secret I put it in a docker container in vault. when it needs infra, it makes me a jira ticket. that's my workflow.
gwking 1 hour 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 1 hour 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).
arianvanp 43 minutes ago||
okay but that doesn't help a single bit with the OPs point. Your xcode tools do not run inside a docker container
pianopatrick 1 hour ago|||
You could move your SSH keys onto a password encrypted usb drive that you physically remove from the computer.
wrxd 1 hour ago||
An alternative is to use ssh keys stored in the Secure Enclave with tools like https://secretive.dev/
pianopatrick 1 hour ago||
Seems to me a tool like that would stop the agent from sending those specific keys elsewhere. But a tool like that would not stop the agent who is acting as you from using the SSH keys via the CLI. You would want to combine that with other tactics like having the agent run as some other user.
samhclark 54 minutes ago||
Secretive (and the similar built-in functionality [1]) both allow you to require TouchID too. I found an okay balance using two SSH keys: one for commit signing (w/o TouchID) and one for everything else (requires TouchID, or PIN on Linux)

So, the actions that I really don't want the agent to take (establishing an SSH connection, pushing to a git remote) always require my manual intervention.

[1] https://gist.github.com/arianvp/5f59f1783e3eaf1a2d4cd8e952bb...

colechristensen 1 hour 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 1 hour 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.

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.
amelius 1 hour ago|||
Do the coding agents know about this tool?
Yiin 31 minutes ago||
just link it?
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.
octavore 16 minutes ago||
Shameless plug: I've been working on strudel [0], a CLI that uses a lot of the same ideas in this post and allows you to build/sign/notarize Mac (and iOS) apps without touching Xcode. It has a dry run mode so you can see the actual commands being run, which was important to me to have so there's no mystery about what's happening.

I should blog about more this, but I also went to some effort to add support free iOS provisioning with just an Apple ID (using internal APIs); and creating a nice DMGs for macOS app distribution (reverse engineered .DS_store files for this). And there's also a built-in command to install skills for coding agents, which was fun.

This [1] is an example app I built with it, a simple utility to manage macOS file extension handling.

[0] https://github.com/octavore/strudel

[1] https://github.com/octavore/tots.app

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 1 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 1 hour 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).
semiquaver 4 hours ago|||
Axiom is excellent, thanks for making it!
CharlesW 1 hour ago||
I'm glad that it's been valuable for you!
smashah 1 hour 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 1 hour ago||
Sounds very intriguing! Please reach out (see my profile) when you're ready to share more.
zuzululu 4 hours ago||
will it work with flutter ?
CharlesW 3 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.
Tiberium 5 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||
I heard you liked Claude, so I put extra Claude in your Claude so you can do more Claude.
lossyalgo 1 hour ago|||
I suppose it's easier to turn everyone into unwitting tokenmaxxers than it is to raise prices again.
theParadox42 3 hours ago||||
… that Claude can use, because Claude can’t use the XCode gui very efficiently.
carimura 2 hours ago||||
"Claude was the only LLM to survive the LLM Wars."
throwaway613746 1 hour ago|||
[dead]
quasarj 1 hour ago||
The mistakes in the text made me doubt it was AI, but who knows, maybe it's doing that on purpose now
ImaCake 50 minutes ago||
It seems too concise to be AI. My (conscious) heuristic for AI writing is how much context is squeezed into a sentence. LLMs seem to be pretty bad at the kind of elegant compression of meaning humans can do when they have done a lot of writing practice.

If I had to guess, I would say this is the human summarised conversation(s) with a bot.

WhitneyLand 24 minutes ago||
Everyone will still need to use Xcode for at least some debugging, no way around that.

As for the builds, your agent probably already knows how to do a lot of this from the command line, although explicit suggestions can help it build faster for different situations.

As for XcodeGen, you may find it unnecessary overhead if you're already using Xcode file system synced groups.

For iOS my biggest suggestion would be to enable App Store Connect skills for your agent (https://github.com/rorkai/App-Store-Connect-CLI).

With this not only do you not need Xcode all the time, you also don't even need to be near a MacBook.

Just make changes via Codex on your iPhone, the tell asc to build and upload to TestFlight, download and run the new version, iterate.

ChrisMarshallNY 1 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 1 hour ago|
That's good to hear. I never even tried to make anything for macOS because I opened Xcode and.. well, you know.
gwking 1 hour 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.

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 1 hour 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.
esafak 55 minutes ago||
This one?? https://expo.dev/

   Our code broke
   It looks like there was an error we need to look at. Sorry about the inconvenience.
cobbzilla 2 minutes ago||
HN hug of death? seems to be back now.

fwiw, expo seems solid; the uptime of expo.dev won't affect an app built with it.

hyzyla 3 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

More comments...