Maintaining a Swift and Objective-C Hybrid Codebase - Shopify
Jun 15, 2017

Summary
This post details strategies for maintaining a hybrid Swift and Objective-C codebase in mobile applications. It covers ensuring interoperability through nullability annotations, leveraging the `@objc` attribute for granular bridging control, wrapping Swift-only types in NSObject subclasses, and using Swift extensions to add Objective-C-visible methods and categories. The goal is to enable the adoption of Swift for new development while continuing to support and integrate with existing Objective-C code.
More from the Shopify Mobile Hybrid Architecture trail
- Mobile Bridge: Making WebViews Feel Native (2025) - Shopify
- Migrating our Largest Mobile App to React Native - Shopify
- Implementing Server-Driven UI Architecture on the Shop App - Shopify
- Remote rendering: Shopify’s take on extensible UI - Shopify
- A Kotlin Style .copy Function for Swift Structs - Shopify