UNPKG

react-native-quick-crypto

Version:

A fast implementation of Node's `crypto` module written in C/C++ JSI

17 lines (16 loc) 594 B
"use strict"; import { withDangerousMod } from 'expo/config-plugins'; import fs from 'fs'; import path from 'path'; export const withSodiumIos = config => { return withDangerousMod(config, ['ios', config => { const podfilePath = path.join(config.modRequest.platformProjectRoot, 'Podfile'); let contents = fs.readFileSync(podfilePath, 'utf-8'); if (!contents.includes("ENV['SODIUM_ENABLED']")) { contents = `ENV['SODIUM_ENABLED'] = '1'\n${contents}`; fs.writeFileSync(podfilePath, contents); } return config; }]); }; //# sourceMappingURL=withSodiumIos.js.map