should I use Objective-C
Asked on 07/31/2024
2 searches
Whether you should use Objective-C or not depends on your specific needs and context. However, based on the content presented at WWDC, Apple is strongly advocating for the use of Swift over Objective-C for several reasons:
-
Performance and Safety: Swift is designed to be a safer and more performant language. It includes features like automatic reference counting (ARC) to manage memory efficiently and safely, which can be seen in the session Analyze heap memory.
-
Interoperability: Swift has excellent interoperability with C and Objective-C, allowing you to incrementally adopt Swift in your existing projects. This is highlighted in the session What’s new in Swift, where it discusses how Swift can be used alongside C and Objective-C.
-
Future-Proofing: Apple is committed to adopting Swift across its software stack, from apps and system services to frameworks and even firmware. This commitment is discussed in the Platforms State of the Union, indicating that Swift is the future direction for Apple development.
-
Ease of Use and Modern Features: Swift is designed to be more approachable and easier to use, with modern language features that simplify development. This is elaborated in the session A Swift Tour: Explore Swift’s features and design, which covers Swift's object-oriented features and memory management.
-
Cross-Platform Development: Swift's capabilities extend beyond just Apple platforms. It is being used in various domains, including embedded systems, as shown in the session Go small with Embedded Swift.
In summary, while Objective-C is still supported and can be used, Swift offers numerous advantages in terms of performance, safety, and future-proofing your code. Therefore, it is generally recommended to use Swift for new projects and consider migrating existing Objective-C code to Swift where feasible.

Go small with Embedded Swift
Embedded Swift brings the safety and expressivity of Swift to constrained environments. Explore how Embedded Swift runs on a variety of microcontrollers through a demonstration using an off-the-shelf Matter device. Learn how the Embedded Swift subset packs the benefits of Swift into a tiny footprint with no runtime, and discover plenty of resources to start your own Embedded Swift adventure.

Platforms State of the Union
Discover the newest advancements on Apple platforms.

SwiftUI essentials
Join us on a tour of SwiftUI, Apple’s declarative user interface framework. Learn essential concepts for building apps in SwiftUI, like views, state variables, and layout. Discover the breadth of APIs for building fully featured experiences and crafting unique custom components. Whether you’re brand new to SwiftUI or an experienced developer, you’ll learn how to take advantage of what SwiftUI has to offer when building great apps.