Skip to content

Commit 4da3b62

Browse files
authored
fix: expo plugin sodium not working on SDK 55+ (#958)
1 parent 750767b commit 4da3b62

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

packages/react-native-quick-crypto/src/expo-plugin/withSodiumIos.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,8 @@ export const withSodiumIos: ConfigPlugin<ConfigProps> = config => {
1414
);
1515
let contents = fs.readFileSync(podfilePath, 'utf-8');
1616

17-
// Check if SODIUM_ENABLED is already set
1817
if (!contents.includes("ENV['SODIUM_ENABLED']")) {
19-
// Add it right after the RCT_NEW_ARCH_ENABLED ENV variable
20-
contents = contents.replace(
21-
/^(ENV\['RCT_NEW_ARCH_ENABLED'\].*$)/m,
22-
`$1\nENV['SODIUM_ENABLED'] = '1'`,
23-
);
18+
contents = `ENV['SODIUM_ENABLED'] = '1'\n${contents}`;
2419
fs.writeFileSync(podfilePath, contents);
2520
}
2621

0 commit comments

Comments
 (0)