From 4fe54e614064d5b905cd4db788d7b60317a71eab Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Wed, 18 Mar 2026 13:15:06 +0530 Subject: [PATCH] app crash fix by folly in debug build --- ios/Podfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ios/Podfile b/ios/Podfile index 30d8819..dd3d54f 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -77,6 +77,21 @@ target 'DeveloperApp' do config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] |= ['$(inherited)', "RCT_DEV=1"] end + # Workaround for Folly F14 bug exposed by Xcode 26: + # Folly's F14SetFallback.h uses reinterpret_cast to access the private + # internals of std::unordered_set — an unsafe hack that relies on a + # specific memory layout. Xcode 26's libc++ might have changed that layout, + # causing the debug-only assertion (FOLLY_SAFE_DCHECK at line 234) + # to fail with SIGABRT. + # Since F14SetFallback.h is a header-only template compiled by any + # target that includes it, we define NDEBUG for ALL targets to set + # folly::kIsDebug=false, disabling the assertion. This matches the + # behavior of Release/Production builds which already define NDEBUG. + if config.name == 'Debug' + config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [] + config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] |= ['$(inherited)', 'NDEBUG=1'] + end + end end end