Skip to content

fix(ios): patch react-native-keys for bridgeless (RN 0.85) linking - #59

Merged
MounirDhahri merged 1 commit into
mainfrom
claude/rn-keys-bridgeless
Jul 13, 2026
Merged

fix(ios): patch react-native-keys for bridgeless (RN 0.85) linking#59
MounirDhahri merged 1 commit into
mainfrom
claude/rn-keys-bridgeless

Conversation

@MounirDhahri

@MounirDhahri MounirDhahri commented Jul 13, 2026

Copy link
Copy Markdown
Member

Description

Fixes the iOS runtime error:

The package 'react-native-keys' doesn't seem to be linked.

Root cause: react-native-keys@0.7.13 decides whether to use the TurboModule via global.__turboModuleProxy != null (src/index.ts). Under RN 0.84+ bridgeless mode — the default on Expo SDK 56 / RN 0.85 — __turboModuleProxy is null even though TurboModules are enabled, so it falls back to NativeModules.Keys, which is nil in bridgeless. Result: the linking error at startup, which also aborts app registration (→ the secondary "main" not registered error). Android slips past this check, which is why only iOS broke.

Fix: extend the existing react-native-keys yarn patch so the detection also treats global.RN$Bridgeless === true as TurboModule-enabled, so the TurboModule spec (TurboModuleRegistry.getEnforcing('Keys')) is used and the module resolves.
Verified the full patch (existing Android hunks + new src/index.ts hunk) applies cleanly against a pristine 0.7.13.

Verify locally

git pull
yarn install                                  # re-applies the patch
rm -rf node_modules/.expo-build-disk-cache ios # avoid a stale cached binary
yarn prebuild && (cd ios && pod install) && yarn ios

🤖 Generated with Claude Code


Generated by Claude Code

react-native-keys@0.7.13 detects the New Architecture via
`global.__turboModuleProxy != null`, which is null under RN 0.84+ BRIDGELESS
mode (the SDK 56 / RN 0.85 default). It then falls back to NativeModules.Keys,
which is nil in bridgeless, so iOS throws "react-native-keys doesn't seem to be
linked" at startup (which also blocks app registration → 'main not registered').
Android happened to slip past it.

Extend the existing yarn patch to also treat `global.RN$Bridgeless === true`
as TurboModule-enabled, so the TurboModule spec is used and the module resolves.
Matches numandev1/react-native-keys#123. Verified the full patch applies cleanly
against a pristine 0.7.13.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KPWjhmaeq8DnsiiFD9Eg7A
@MounirDhahri
MounirDhahri merged commit 27135cc into main Jul 13, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants