Skip to content

Commit 623861f

Browse files
authored
Merge pull request #202 from mendix/moo/MOO-2251-App_crash_fix_due_to_folly
[MOO-2251] App crash fix occured by folly in debug build
2 parents 4d06280 + 4fe54e6 commit 623861f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

ios/Podfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,21 @@ target 'DeveloperApp' do
7777
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] |= ['$(inherited)', "RCT_DEV=1"]
7878
end
7979

80+
# Workaround for Folly F14 bug exposed by Xcode 26:
81+
# Folly's F14SetFallback.h uses reinterpret_cast to access the private
82+
# internals of std::unordered_set — an unsafe hack that relies on a
83+
# specific memory layout. Xcode 26's libc++ might have changed that layout,
84+
# causing the debug-only assertion (FOLLY_SAFE_DCHECK at line 234)
85+
# to fail with SIGABRT.
86+
# Since F14SetFallback.h is a header-only template compiled by any
87+
# target that includes it, we define NDEBUG for ALL targets to set
88+
# folly::kIsDebug=false, disabling the assertion. This matches the
89+
# behavior of Release/Production builds which already define NDEBUG.
90+
if config.name == 'Debug'
91+
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= []
92+
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] |= ['$(inherited)', 'NDEBUG=1']
93+
end
94+
8095
end
8196
end
8297
end

0 commit comments

Comments
 (0)