Swift 16-9

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.

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.

[tweet https://twitter.com/catfish_man/status/688815036068827137]

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.

FTC: We use income earning auto affiliate links. More.

Check out 9to5Mac on YouTube for more Apple news:

You’re reading 9to5Mac — experts who break news about Apple and its surrounding ecosystem, day after day. Be sure to check out our homepage for all the latest news, and follow 9to5Mac on Twitter, Facebook, and LinkedIn to stay in the loop. Don’t know where to start? Check out our exclusive stories, reviews, how-tos, and subscribe to our YouTube channel

About the Author

Benjamin Mayo

Benjamin develops iOS apps professionally and covers Apple news and rumors for 9to5Mac. Listen to Benjamin, every week, on the Happy Hour podcast. Check out his personal blog. Message Benjamin over email or Twitter.