Help for Realm® apps / Build errors
Realm on Xcode 26.4: 'is_pod' cannot be specialized
Your React Native app uses realm 20.2.0 and the iOS build fails after an update to Xcode 26.4. The cause is one header shipped inside the realm package. It was fixed for the Realm engine and for Realm Swift in February 2026, but no realm-js release has the fix.
Updated 9 November 2026.
The error
'is_pod' cannot be specialized: Users are not allowed to specialize this standard library entity
Xcode shows it on lines like these, expanded from macros in external/s2/base/macros.h:
DECLARE_POD(S1Angle);
PROPAGATE_POD_FROM_TEMPLATE_ARGUMENT(Vector2);
PROPAGATE_POD_FROM_TEMPLATE_ARGUMENT(Vector3);
When it happens
- iOS builds with realm 20.2.0, the last realm-js release (11 August 2025).
- Xcode 26.4. Reported in #7115 (31 March 2026) with React Native 0.77.3. Realm Swift users saw the same error in realm-swift #8812.
- The header ships only in the Apple part of the realm package. Android builds do not include it.
- Later Xcode versions may not hit it: a public iOS release build with unpatched realm 20.2.0 succeeds on Xcode 26.6 (BlueWallet CI, 9 November 2026). We have not tested unpatched realm on Xcode 26.6 ourselves.
Why
realm 20.2.0 ships a prebuilt engine, realm-core.xcframework. One of its headers comes from the s2 geometry library and specializes std::is_pod. The C++ standard library in Xcode 26.4 forbids that, so the compiler stops.
The engine fix is realm-core commit d8f21f9 (22 February 2026), and Realm Swift 20.0.4 includes it. realm-js was never updated: its last release is still 20.2.0.
Fix with afterdb
afterdb ships the same header with the realm-core fix applied.
In package.json, point the two Realm packages to afterdb:
"realm": "npm:@pomwik/afterdb@20.3.0",
"@realm/react": "npm:@pomwik/afterdb-react@0.20.1"
Then reinstall, run pod install on iOS, and rebuild. For Expo dev builds, run npx expo prebuild --clean. Your code keeps import Realm from "realm". If you do not use @realm/react, the first line is enough.
afterdb is an independent open-source fork of the realm-js SDK v20 (Apache-2.0) that we maintain, for apps on realm 20.x without Device Sync. It is not an official Realm release. Code on GitHub, package on npm.
We build and run it in CI with React Native 0.88.1. On Xcode 26.4.1 without frameworks, the app starts on the iPhone simulator and keeps its data after a restart. On Xcode 26.6, with no frameworks, static frameworks and dynamic frameworks, the app starts on the simulator. On both, the build for iPhone devices succeeds. Not tested yet: real iPhones, iOS with React Native 0.86 or 0.87, Expo on iOS, and React Native 0.77.
Without afterdb
- Patch the header yourself. In each slice of
node_modules/realm/prebuilds/apple/realm-core.xcframework, editHeaders/external/s2/base/macros.hso that theDECLARE_PODandPROPAGATE_POD_FROM_TEMPLATE_ARGUMENTmacros expand to nothing, as realm-core commit d8f21f9 does. Keep the change with patch-package. This is what afterdb does. We did not find a public patch for realm-js. - Build with Xcode 26.3 or earlier. App Store Connect has required Xcode 26 since 28 April 2026, so 26.3 is still accepted, but you stay on an old Xcode until the header is fixed.
Need help? Send your versions and the full error for a free 15-minute check. We reply within 12 hours.