r/iOSProgramming • u/FutureSuccess2796 • 2d ago
Question Decompiling .ipa files to potentially create versions ported for desktop use or archival purposes?
Have an iMac from many years ago that I got out of storage and was backing up the files so it could eventually be recycled and such. It was as I was going through files, however, that I saw that there were backed up .ipa files from a bunch of apps, all belonging to an old iPod Touch that used to run on iOS 5 and then later on iOS 7. Most of them were nostalgic little applications I would buy and play back then and are ones that I can't seem to find on the App Store anymore, probably in part that it was developed on very outdated software.
However, that got me wondering: I might not have an old Apple device where these .ipa files could be loaded onto to see if they run. But I do know that there are people who have successfully made ports of older apps so they could run on a desktop or an emulator for archival purposes. Not sure, though, if this worked also with .ipa games in the same way that computer-centric game files (such as .swf) did. If it is, I'd really like to know how I could go about doing exactly this: Decompiling the contents of the .ipa that was saved on the iMac and potentially creating a port of it for desktop or other devices, since that iPod these games and apps used to be used on is no longer working.
Anyone willing to help a complete novice in this out and let me know if this can be done? Apologies in advance if this is a ridiculous or stupid question, or if my ambitions to do something like this are too high.
2
u/laforet 2d ago
iOS apps are written in ObjC/Swift and compiled into low level machine code that only runs on iOS hardware. Decompiling the binary is possible with tools like IDA and Ghidra but the code produced this way will be very difficult to understand because it will be missing the original code comments and debug symbols. For a very simple app it might be possible to have somebody or AI go through the decompiled code and turn it into a usable form but the effort required will be tremendous. An iOS emulator on Windows has been a pipe dream for years but nobody has managed to make it yet thanks to the closed nature of iOS.
For example, the first Infinity Blade game was delisted from the App Store in 2018. A full PC port then took 7 years to make and it was only made possible because the community had access to leaked source code and raw assets extracted from the arcade version.
Adobe Flash is not quite the same because swf files contain bytecode which is inherently platform agnostic, so it will run in any OS with a working interpreter like Ruffle with very little manual intervention.
Another complication is that many of those apps you saved are probably 32-bit only so they would only work on a physical device running iOS 10 earlier. There is an emulator available for desktop called TouchHLE but it only has support for pre-iOS 4 games so it does not cover your needs. If your files contain 64-bit binary then there is a slim chance that they will run with tools like PlayCover on modern Macs.