Essays
I built an iPhone app that rewrites itself
Ask for a feature from your phone, and a few minutes later the app you're holding has it. No reinstall, no TestFlight, no waiting.
I have a personal iPhone app called Morph that changes itself. When I want a feature, I message a coding agent from the phone. The agent edits the Swift code, a script compiles and signs it, and the app I'm holding downloads the new version and swaps it in within a few seconds. Nothing gets reinstalled. Overnight, one agent proposes an improvement, and a second one decides whether to build it, checks it and ships it before morning. It's the strangest piece of software I use, and I think it shows where personal software is going.
How it works
Morph is two pieces.
The first is a thin host app, installed once. It has every permission the app might want, and almost no features of its own.
The second is the real app, plain SwiftUI, compiled into a separate library. When I ship a change, a script builds that library, signs it, and uploads it to a small update server. While Morph is open, the host checks for a new version every couple of seconds. When one appears, it downloads it, checks it against a hash, loads it and replaces the screen. A toast says what changed.
The whole trick is that iOS lets a development-signed app load code signed by the same developer team. That's it. No jailbreak, no exploit. It only works on my own devices.
On top of that sit the agents. From inside the app I can send a request like "add a rest timer to the workout screen" to an agent running on my Mac. It makes the change in the code, ships it, and the phone picks it up. The first time you watch a feature you asked for 3 minutes ago appear under your thumb, it feels slightly illegal.
The overnight build
The part I didn't expect to like this much is the overnight build.
Early in the morning, an agent that knows how I use the app proposes one change. Another agent, one that knows the code, decides whether the idea is any good. It can build it as proposed, build a smaller version, pick an alternative, or decline. It's allowed to ask the first agent up to three questions. Then it builds the change, runs the tests, looks at the new screens in a simulator in both light and dark mode, and ships. The morning summary says what changed and links to the agent's work.
Its instructions say it plainly. "Declining is a fine outcome. Shipping something broken, ugly or unsafe is not."
Some mornings there's a small new thing in the app. Some mornings the agent has declined and explained why. Both are fine.
The guards matter more than the agent
Letting an AI ship code to your own phone is only sane with rails, and most of the engineering effort went into those, not into the agent.
- Every download is checked against a hash before it runs.
- A version that crashes or fails to load within 8 seconds of starting is marked bad, and the app falls back to the last good one.
- The overnight agent's changes go through a diff check. It can only touch the app's own code, it has a size limit, and it's blocked from adding network calls, touching secrets, deleting data or asking for new permissions. If a feature needs any of those, it isn't an overnight feature.
- If there's unshipped work in the code from a human session, the overnight build refuses to start.
This is the same lesson I wrote about in Infinite tokens won't build you a better app. The model is the easy part. Deciding where it's allowed to go is the actual work.
Why you can't download this from the App Store
Apple doesn't allow it, and for good reasons. App Review guideline 2.5.2 says apps may not "download, install, or execute code which introduces or changes features or functionality of the app." The App Store's whole safety model depends on Apple reviewing the code that runs on your phone. An app that can become a different app overnight breaks that.
So this is personal software, for the person who owns the developer account. It's not a business model. I'm fine with that, because the interesting part isn't the distribution. It's the idea that an app can keep reshaping itself around one person.
The Mac version of this is already easy
On a Mac, you don't need any of the host-app tricks. If an app is open source, you can already have your own version of it.
Take T3 Code, an open-source app for running coding agents, published under the MIT licence. Say you love it but want one feature it doesn't have. You could fork it, ask an agent to add your feature, and set up a daily job where the agent pulls the latest main branch, reapplies your change, fixes anything that broke, and rebuilds your copy. You keep getting the team's improvements, plus your one thing.
Some open tools go further and let you add self-improvement as a plugin. DeepSeek Harness, DeepSeek's open-source agent harness, is built so that "everything is a plugin," and dsh-self-improved is an MIT-licensed plugin for it that does this. It pulls the key points out of your conversations into a memory store on your computer, and brings back the relevant ones before each new turn, so the agent remembers you. Once a night it reviews what it has collected, groups related memories, updates its picture of you and turns workflows that worked into reusable skills. Nothing is uploaded. It's the same overnight loop as Morph's, applied to an agent instead of an app.
That changes what "opinionated software" means. The team's opinions become the starting point, not the ceiling. You adopt the 95% you agree with and bend the 5% you don't. I argued in an earlier essay that opinions are what's left when AI can copy features. This is the other side of it. When anyone can modify an open app, the best defaults win, because they're the ones people bother to keep.
Where this stops working
A few honest limits:
- Phones and paid services. You can't fork an iPhone app from the App Store or a company's servers. For that kind of software, marketing still decides who gets picked, because users can't bend what they can't touch.
- Big changes. Keeping a fork in sync is easy when your patch is small. If you rewrite half the app, every upstream change becomes a merge fight, AI or not.
- Security. Anything that can update your app is a target. Signing, hashes and rollbacks aren't optional extras.
- Taste. An agent that ships every night will happily fill your app with features. Most should never ship. The ability to say no has to be built in, which is why the overnight agent is told declining is fine.
What it means
For developers, a self-improving app is now a weekend project, at least for your own phone. Building one teaches you a lot about where agents are good, which is writing the change, and where they need you, which is deciding what's allowed.
For everyone else, the direction is clear even if the App Store version of it isn't here. Software is getting easier to bend toward one person. Learnfold is an App Store app, so it can't rewrite its own code. Its version of the idea is smaller. A course plan you approve, then lessons that grow with your questions, so the course you end up with is shaped by what you asked and not by what someone planned for everyone.
Quick answers
Can an iPhone app update its own code?
Not in the App Store. Apple's guideline 2.5.2 says apps may not download, install or execute code that introduces or changes features. A development-signed app on your own phone can load code signed by the same developer team, which is the trick my personal app uses.
What is a self-improving app?
An app wired up to an AI coding agent so that asking for a change is enough. The agent edits the code, a script builds and ships it, and the app picks up the new version by itself. Mine also has an agent that proposes and builds one improvement overnight.
Can I keep my own features in an open-source app with AI?
Yes. Fork it, keep your changes as a small set of patches, and have an agent check the main branch on a schedule, reapply your patches and rebuild. It works best when your changes are small and the project's licence allows it, as MIT does.
Is it safe to let an AI ship code to your own phone?
Only with guards. Mine checks every download against a hash, rolls back any version that crashes on start, and blocks overnight changes that touch the network, secrets or permissions. It is still only for my own devices.
Sources
- App Review Guidelines, 2.5.2, Apple Developer. Accessed November 8, 2026.
- T3 Code README and MIT licence, pingdotgg/t3code on GitHub. Accessed November 8, 2026.
- dsh-self-improved README, madage/dsh-self-improved on GitHub. Accessed November 9, 2026.
- DeepSeek Harness README, deepseek-ai/deepseek-harness on GitHub. Accessed November 9, 2026.