Apple doubles use of Swift rather than Objective-C in iOS 13
In nowadays everyone knows about the Apple brand, recently Apple has launched its new OS version iOS 13. Apple mostly uses Objective-C language for development but an analysis shows that Apple’s own use of Swift has doubled in iOS 13 as it further distances itself from Objective-C.
Objective-C and Swift both are programming language mostly use for iOS development.
Objective-C is a general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C programming language. It was the main programming language supported by Apple for the macOS, iOS and iPadOS operating systems, and their respective application programming interfaces (APIs) Cocoa and Cocoa Touch until the introduction of Swift.
The language was originally developed in the early 1980s. It was later selected as the main language used by NeXT for its NeXTSTEP operating system, from which macOS and iOS are derived. Portable Objective-C programs that do not use Apple libraries, or those using parts that may be ported or reimplemented for other systems, can also be compiled for any system supported by GNU Compiler Collection (GCC) or Clang.
Swift is a general-purpose, multi-paradigm, compiled programming language developed by Apple Inc. for iOS, iPadOS, macOS, watchOS, tvOS, Linux, and z/OS. Swift is designed to work with Apple’s Cocoa and Cocoa Touchframeworks and the large body of existing Objective-C code written for Apple products. It is built with the open source LLVM compiler framework and has been included in Xcode since version 6, released in 2014. On Apple platforms, it uses the Objective-C runtime library which allows C, Objective-C, C++ and Swift code to run within one program.
Swift was introduced at Apple’s 2014 Worldwide Developers Conference (WWDC). It underwent an upgrade to version 1.2 during 2014 and a more major upgrade to Swift 2 at WWDC 2015. Initially a proprietary language, version 2.2 was made open-source software under the Apache License 2.0 on December 3, 2015, for Apple’s platforms and Linux.
Of course, much of Apple’s reason to continue using Objective-C code within its operating systems is that it’s legacy code which is still functional. As the old adage goes: “If it ain’t broke, don’t fix it”.
That doesn’t mean Apple’s use of Swift isn’t increasing. Developer Alexandre Colucci has been keeping track of the usage of Swift in Apple’s operating systems since iOS 9, which included a single binary using Swift code. His latest report shows that on iOS 13, there are 141 binaries using Swift, more than doubling the number of binaries using Swift from iOS 12.
As you might imagine, Swift is primarily being used in new additions to iOS in addition to updates to existing apps such as Sidecar, Reminders, Health, Books, Find My, and Shortcuts. Some system-level services in iOS 13 are also using Swift including the one to support the new offline capabilities of Find My and the daemon responsible for pairing devices like HomePod and AirPods.