The TIOBE index uses search engine rankings to track popularity of programming languages. In January, Swift overtook Objective-C to become the 14th most popular language in the TIOBE index. The surge in popularity was spurred by the release of Swift into open-source in December. With developer interest growing, Ryan Olson was interested in how much Apple is using Swift for its own apps.
Try Amazon Prime 30-Day Free Trial
Despite producing the language, Apple is not ahead of the curve on Swift adoption. In his blog post, Olson finds that in iOS 9.2 only one Apple app uses Swift: Calculator.
Swift has quickly gained popularity among many third party developers, but what about for Apple’s own code? As of iOS 9.2, Calculator.app is the only place in the system that you’ll find any Swift. I expected to find at least a few other apps or frameworks that had incrementally adopted Swift for new code, but that doesn’t appear to be the case for now.
Calculator.app is actually almost “pure Swift” with only 2 of its 22 classes written in Objective-C. Just like third party apps that use Swift, Calculator.app has to bundle the Swift libraries it links to. There are no Swift libraries included with the OS because the ABI is not yet stable.
Calculator is being used as a testbed for Swift within Apple, apparently, written mostly in the new language. However, it’s the only stock app to use Swift. Usage beyond Calculator in iOS is non-existent. For its apps in the App Store, Apple has used Swift for its Apple Store Watch app and some parts of the WWDC app. On The Talk Show, Craig Federighi said that the OS X 10.11 Dock uses Swift. Beyond these cases, however, Swift usage in public Apple code is non existent.
Apple isn’t lagging behind for no reason. Federighi said Apple engineers are free to use Swift where it makes sense. Accounting for normal development timelines, the community is generally expecting significant uptake of Swift for Apple’s apps going forward, especially with OS X 10.12 and iOS 10 later in the year. The interoperability with Objective-C makes it straightforward for engineers to add Swift features gradually into existing projects.
David Smith (@Catfish_Man) January 17, 2016
A big factor for the lack of update is that the Swift Application Binary Interface (ABI) is not locked down. Until this happens, a goal for Swift 3, it is practically impossible for Apple to make stable Swift frameworks without breaking application compatibility with every release.