Working with C and C++ in Apple environment
summary
Argues for embedding C/C++ to share domain logic across iOS, macOS, Android and Windows, showing a working integration: a header-only JSON library as a single-file example, Swift Package Manager needs an add empty .cpp to satisfy SwiftPM workaround, and larger C++ libs compile to XCFrameworks and link fine though binaries grow unless linker strips unused slices. Recommends hiding C++ with a Swift wrapper + protocol for UI mocks, uses OpaquePointer and passRetained for async callbacks, tests with Google Test, and notes C++ interop in Xcode 15 early but usable.
AI-written summary · about
chapters (12)
- 0:00Introduction and speaker background
- 1:08Motivation for C and C++ in Apple apps
- 5:05C-only frameworks in Apple ecosystem
- 7:51Approaches to C and C++ interoperability
- 8:16Integrating C/C++ libraries in Xcode
- 9:41Demo: Adding a C++ library to iOS app
- 13:52Real-world C++ library integration
- 15:40Wrapping C++ with Swift for UI
- 17:27Synchronous and asynchronous C calls
- 20:23C++ interop in Xcode 15
- 21:44Key resources for C++ interop
- 22:07Q&A session
related talks
41mCrossplatform 2019: C ++ as an antagonist in a progressive world
32mSimplified Swift Multiplatform Integration
01h 08mWindows, Macos & the Web: Lessons From Cross-Platform Development
01h 01mA Deep Dive into 2 Cross-Platform Mobile Apps Written in C++
45mHow to combine Swift/Kotlin with C/C++
01h 11mC++ in the World of Embedded Systems
01h 00m3rd party tools and frameworks you use in your applications and why
49mWindows, macOS & the Web: Lessons from Cross-platform Development at think-cell
