fix: expo plugin sodium not working on SDK 55+#958
Merged
Conversation
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
|
i made the same fix on my end putting the env on the top. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_ENABLEDENV line in the Podfile, which no longer exists in newer SDK versions.Changes
Testing
ENV['SODIUM_ENABLED'] = '1'appears at the top of the generated Podfile after runningnpx expo prebuild --platform iosFixes #957