Even though we don’t have access to the iOS source code, we can identify the programming languages used in different iOS versions. This approach obviously has some limitations, and while it is impossible to guarantee that the results are perfectly accurate, the general picture is roughly clear.
Software developer Alexandre Colucci researched the use of different programming languages within iOS, providing a detailed overview of the evolution of programming languages over more than a decade of iOS development.
The essence of the research is that he analyzed executable files and application files in different versions of iOS, everything above the kernel. The XNU kernel and low-level firmware (SecureROM, Baseband, …) are not included in this analysis. He counted the frameworks and languages in which they are written and came up with general statistics on the use of languages within iOS 14.
In total, 4173 files were found in iOS 14 – as you can see, the system has become almost 20 times more complex, compared to the iPhone OS 1.0:
Although a binary can use multiple programming languages, the use of different languages within the latest version looks like this:
- 88% use Objective-C;
- 17% use C ++;
- 8% use Swift;
- 8% are written entirely in C;
- 1% use SwiftUI
Interesting trends identified
- Objective-C is still an essential component of iOS 14;
- C ++ and C also play an important role. These languages are commonly used by binaries related to audio, video, telephony, the Internet, and other low-level frameworks.
- Swift was quickly adopted and is already used in 8% of binaries in iOS 14.
Key takeaways from Alexandre Colucci’s project
- iOS is getting more complex with each release.
- iPhone OS 1.0 contained fewer binaries than iOS 14.0 binaries written in Swift.
- Interestingly, 88% of binaries in iOS 14 rely directly or indirectly on Objective-C. Objective-C, despite forecasts of its decline, continues to be an important programming language in iOS.
- The use of Swift is progressing, and now there are more binaries using Swift than binaries written entirely in C. However, the deployment of the new language has been slow.
- The number of binaries using Objective-C continues to grow with each new iOS release.
- The use of C ++ has also grown steadily over the years – now 17% of binaries in iOS 14 use C ++. On the other hand, the number of binaries written entirely in C is currently being in decline.
Stay tuned with Software Focus!