Repository navigation
Conversation
…h Xcode 27 When NitroModules is built with Xcode 27, the inline `makeException` helper emitted through the Swift C++ interop build references `std::exception_ptr::__from_native_exception_pointer(void*)`, which only exists in the iOS 18+ system libc++. Apps that still support iOS < 18 then abort at launch in dyld with "Symbol not found" (verified on iOS 16 and 17). Replace `std::make_exception_ptr` with the throw/catch fallback, which only needs `std::current_exception` and links on every supported iOS version. Fixes margelo#1652 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Came across this issue and verified the propsed patch works for us. Thanks! |
|
I'm using I searched for other uses of So it might be worth modifying these other two places as well in this PR. Thanks for the code changes! They helped me identify and fix the remaining part of the problem on my side. |
Fixes #1652
Problem
When NitroModules is built with Xcode 27, the inline
makeExceptionhelper inios/utils/RuntimeError.hpp, emitted through the Swift C++ interop build (RuntimeError.swift), referencesstd::exception_ptr::__from_native_exception_pointer(void*). That symbol only exists in the iOS 18+ systemlibc++, so any app that links NitroModules and still supports iOS < 18 aborts at launch in dyld:With Xcode 27 now GA, this is a hard blocker for App Store releases of every app supporting iOS 16/17 (react-native-mmkv, etc.).
Fix
Replace
std::make_exception_ptrwith the throw/catch fallback, as suggested by @vnahornyi in #1652. It only needsstd::current_exception, which links on every supported iOS version. Behaviour is identical: the returnedexception_ptrstill wraps astd::runtime_errorcarrying the message, sogetExceptionMessageandlocalizedDescriptionare unaffected.Validation
We have been shipping this exact change as a patch on
react-native-nitro-modules@0.37.1for about two weeks: app launches on iOS 16, iOS 17 and iOS 27, built with Xcode 27, no regressions observed.🤖 Generated with Claude Code