Best Objective-C++ Open Source Repositories

The best open source repositories built with Objective-C++.

Ege Beşe's profile

Written by Ege Beşe

Favicon

 

  
  
Favicon

 

  
  
Favicon

 

  
  
Favicon

 

  
  
Favicon

 

  
  
Favicon

 

  
  

Objective-C++ is a hybrid language variant that lets Objective-C and C++ code exist and interoperate directly within the same source file, using a file extension of mm to signal to the compiler that both language features are in play. It's not a separate language so much as a compiler mode: Clang, the compiler Apple's toolchain is built on, understands both Objective-C's message-passing syntax and C++'s class and template features simultaneously, letting a single function mix calls to Objective-C objects and C++ classes without a separate bridging or wrapper layer.

This combination exists almost entirely to solve one practical problem: connecting Objective-C-based Apple platform code to C++ libraries that have no Objective-C bindings of their own. Rather than writing a full C-compatible wrapper API around a C++ library just to call it from Objective-C, developers can write a thin Objective-C++ layer that talks to the C++ code directly and exposes a normal Objective-C interface to the rest of the application.

Because of this narrow but specific use case, Objective-C++ shows up almost exclusively in projects that need to bridge a cross-platform C++ codebase to Apple platform APIs. Repos on this page using it include Flutter and React Native, both of which maintain C++ engine or bridge code that needs to call into iOS and macOS system APIs, PyTorch, which uses it for parts of its Apple platform integration, and OBS Studio, which relies on Objective-C++ to connect its C++ core to macOS-specific capture and rendering APIs.

Frequently asked questions

Share: