Skip to content

fix: expo plugin sodium not working on SDK 55+#958

Merged
boorad merged 1 commit into
mainfrom
fix/expo-plugin-sodium-ios
Feb 27, 2026
Merged

fix: expo plugin sodium not working on SDK 55+#958
boorad merged 1 commit into
mainfrom
fix/expo-plugin-sodium-ios

Conversation

@boorad
Copy link
Copy Markdown
Collaborator

@boorad boorad commented Feb 27, 2026

Summary

Fixes the Expo config plugin for enabling libsodium on iOS. The plugin was failing on Expo SDK 55+ because it relied on a regex match against the RCT_NEW_ARCH_ENABLED ENV line in the Podfile, which no longer exists in newer SDK versions.

Changes

  • Replaced the fragile regex-based insertion with a simple prepend to the top of the Podfile
  • Removed unnecessary comments
  • Net reduction of 5 lines

Testing

  • Verify ENV['SODIUM_ENABLED'] = '1' appears at the top of the generated Podfile after running npx expo prebuild --platform ios
  • Confirm libsodium is included in the iOS build

Fixes #957

Expo SDK 55 removed ENV['RCT_NEW_ARCH_ENABLED'] from the Podfile
template since New Architecture is now mandatory (RN 0.83+). The
withSodiumIos plugin was using that line as a regex anchor to insert
ENV['SODIUM_ENABLED'], so the replacement silently matched nothing.

Instead of anchoring to any specific Podfile line, prepend the ENV
assignment to the top of the file. This works regardless of Podfile
template changes across Expo SDK versions.

Fixes #957
@boorad boorad self-assigned this Feb 27, 2026
@boorad boorad merged commit 4da3b62 into main Feb 27, 2026
2 checks passed
@boorad boorad deleted the fix/expo-plugin-sodium-ios branch February 27, 2026 14:31
@xgiovio
Copy link
Copy Markdown

xgiovio commented Feb 27, 2026

i made the same fix on my end putting the env on the top.
Waiting for a new release.
Thanks

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.

🔧 libsodium not included - expo55, react 0.83.2

2 participants