'Codex in Xcode can probably take an entire ObjC project and convert it to Swift on its own'

Alright, bet.

I handed it the classic SameGame codebase, gave it my coding style markdown file, and said "So this is an old ObjC app for iOS. I would like you to completely convert it 1:1 to modern Swift, with the coding style in mind. Leave no ObjC behind"

No other prompts needed; I needed to update a few legacy things in the xcode project settings (min OS version, Swift version, etc), and got this:

All automatic, not a line of ObjC remains. Deprecated APIs were all modernized. 5,400 lines of ObjC became 2900 lines of Swift 5
I had long since rewritten the app myself in Swift, so this was only a contrived test of Xcode's new agentic programming support. But it did in 5 mins what took me months (years?) of on-again/off-again effort and preparation
Nonetheless, if this is what you're up against, you have /absolutely no shot/ of convincing a brand new Xcode developer that they should spend weeks doing something the hard way ('because that's how I did it!') when the IDE will do it for you in the background before you've finished your coffee. This feels much more like the shift from assembly code, even punch cards, to programming languages. If you've kept within the Apple bubble up to now, this stuff is going to be a massive shock
Your only reprieve is that this stuff is so expensive right now. Codex at $20/mo is fine for tinkering, but you'd be forced into the $200/mo plan if you used this every day. Claude, which I've never used, also sounds way too expensive for my taste. If (and when) LLM-based agentic programming like this becomes free, gameover

ObjC to Swift is too easy, all things considered. What about porting the app to another platform, like… Android?

Hold my beer

So yeah now I have a 1:1 recreation of classic SameGame in Android's Java/XML 😑

I passed it the Swift version of the project (*that it had created from the original ObjC project*), and instructed it to turn it into an Android project that I could just open in Android Studio and install. Did the lot, made the build config, transcoded the audio to .ogg, and now it just… *exists* on Android.

It preserved my animations, my layout, my navigation, everything. It did require guidance for last mile

It even supports splitscreen 🤣

RIP cross-platform frameworks.

Remember how much effort Microsoft put into acquiring WinObjC and trying to build an SDK with it and convincing developers to use it, and how nobody did?

You could do that.

Or you could ask Claude/Codex to just port an app for you in 15 minutes

I'd tried this conversion process before, perhaps a year ago, with the agent feature in ChatGPT (the one that boots up a cloud VM to perform a task) and got nowhere. There has clearly been a lot of progress made here in a short amount of time, no doubt spurred on by what Anthropic has been doing with Claude. It's hard to believe Xcode has been retooled to support both so fast

Since people have been asking, the initial iOS -> Android porting prompt used here was:

"Hi codex. So this here samegame folder is an iOS project written in Swift. I would really like to convert it 1:1 to Android using the latest APIs, such that I can point Android Studio at this project folder and build and run it. Is this something you can do? I want it to look and feel exactly the same as the iOS app"

It then asked me how it wanted it built, and I said Java/XML.

That got me 80% of the way

(I think people think I have some magic LLM juice I sprinkle into my prompts 😅 I do not. I chat with it like I would someone on iMessage)

I didn't think to check it yesterday, but apparently my SameGame Android port happily runs on Android back to 5.0 Lollipop from 2014 👀

I was expecting to simply throw away this project, now I don't really know what to do with it.

If I had had this superpower 10+ years ago, every single one of my apps would have been on Android and Windows Phone

This seemed so hard to believe that I dug my own Nexus 4 out of storage (running Android 5.1) and tried it myself. Works just fine!
I spent some time cleaning up the project and prepping it for Google Play, testing the gameplay and leveling. It maintained the various language localizations too, which was a nice bonus. I'm too lazy to fill out the app icon / screenshot metadata just yet, but I've tested Google Play distribution internally at least. I'm still reeling from the fact that this is possible, never mind viable
The Google Play publishing console is just wizards all the way down. It's such a mess to navigate
Google Play submission review takes as long as Apple's App Review now. They really have locked down so much of Android over the past decade — it's all much closer to Apple's walled garden

One really odd thing about the Google Play equivalent to TestFlight is that you can't upload the same build to multiple tracks, and you can't move that same build along to production. Almost feels like it defeats the purpose?

(Also its TestFlight review took *3 days*. Remember when you could just ship things on Android? I remember…)

I didn't mention it earlier, but this version of SameGame is also now available on Android. It's not a port of the latest version of the codebase, like Lights Off, as this was a different kind of experiment. But since it was so successful, it opened the door for Lights Off and future, better, more-complex apps on the platform

https://play.google.com/store/apps/details?id=com.highcaffeinecontent.samegame

@stroughtonsmith You should be able to promote a build from one track to the next? Is this available?
@stevex @stroughtonsmith Yes, but that UI element is only available for releases in the internal testing track. But if you remember to go there you can promote to whatever tracks.
@stevex good to know, doesn't help that it's so confusingly laid out
@stroughtonsmith Yeah, the whole Google Play experience is a mess. And if something goes wrong, Google support is basically nonexistent. Took me months to get a phone number verified.
@stroughtonsmith review time might be dependent on the account / App. Never seen times longer than a night
@stroughtonsmith On the screen where you drag-drop/upload your app bundle, there should be a button that says “Add from library” and should allow you to select a previously uploaded version. I’m pretty sure I use that all the time to send the same build to internal testers and external testers. It’s sorta like the TestFlight Builds “library” though the workflow is a little different.
@stroughtonsmith not for updates. I find they are almost always out in under 2 hours. Usually under 1 hour

@stroughtonsmith In my experience Google is more strict than Apple in many ways. Google will sometimes do a review of an app out of the blue and possibly “reject” it and give you quite short deadline to fix it.

I am talking about a full review of an existing app, without a new version upload and no activity for months.

@stroughtonsmith and every 1-2 years it‘s a new „experience“…

@stroughtonsmith I did a small Flutter project at my previous employer, including deploying via App Store Connect and Google Play.

100% agree.

@stroughtonsmith Why don't let the agent fill in the fields?
@gklka I'll leave that to the kool-aid folks
@stroughtonsmith You single handedly could have saved Windows Phone and I would still be using those lovely designed Nokia phones! 😀
@stroughtonsmith So what I’m hearing is AI could have saved Windows Phone. 😅
@stroughtonsmith Man if someone wanted to launch a new platform right now…
@stroughtonsmith using these tools since July or so has taught me that you definitely don’t have to do that ridiculous prompting format that most AI guys use where you’re like “you are an expert iOS software engineer…”

@stroughtonsmith Inspired by your post, I tried this myself and I can just say wow. From 0 to 1 in just a few minutes. I’m not into Android development at all so this felt just magical.

But I burned through my whole usage limit for the session.

@stroughtonsmith Nice writeup! I'm curious about code quality. I've been using Claude and it seems to make dumb decisions. They… work… but are suboptimal and often inefficient. (Like introducing unecessary state.) I'm curious if this generated code "good" code or “it works so who cares" code?
@gregatron5 this is one of my oldest projects, dating back to 2008. I wouldn't consider the original code 'good' by any means, so maybe that's an unreasonable comparison. I can't speak for the Android code, but the Swift code I've had it writing has all been very similar to my own

@stroughtonsmith @gregatron5

It seems to be far better at “translating” tasks, like moving from one language or platform to another.

In these tasks it doesn’t have to make so many architectural decisions because you made them already.

@dandylyons @gregatron5 I had it build three new apps yesterday?
@stroughtonsmith interesting point! If execution is cheap, then why not do native ports for each platform

@stroughtonsmith I wonder how it'd work the other way.

I am working on React Native apps -- yes, I have made some wrong life choices, and it's a corporate decision to "write once, debug everywhere", nonetheless -- and whether it would convert one to native iOS and Android.

But your take is interesting on the whole cross-platform framework scene.

@stroughtonsmith I said this a couple of months ago, and the RN people didn’t take it well 🫠 If you are a native dev, it is better to learn how to prompt engineer your way to converting your app from SwiftUI to JetPack Compose and vice versa than learn RN and deal with that side of the aisle.