We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 750767b commit 4da3b62Copy full SHA for 4da3b62
1 file changed
packages/react-native-quick-crypto/src/expo-plugin/withSodiumIos.ts
@@ -14,13 +14,8 @@ export const withSodiumIos: ConfigPlugin<ConfigProps> = config => {
14
);
15
let contents = fs.readFileSync(podfilePath, 'utf-8');
16
17
- // Check if SODIUM_ENABLED is already set
18
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
- );
+ contents = `ENV['SODIUM_ENABLED'] = '1'\n${contents}`;
24
fs.writeFileSync(podfilePath, contents);
25
}
26
0 commit comments