From 534ae77eac194fdf93dd8b823c88a634fd916b8e Mon Sep 17 00:00:00 2001 From: karthiccc23 Date: Thu, 5 Oct 2023 08:17:42 -0700 Subject: [PATCH] Add optional podRepoUpdate in iosConfig --- .../container/container-integration.md | 12 ++++++++++++ ern-container-gen-ios/src/IosGenerator.ts | 13 ++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/docs/platform-parts/container/container-integration.md b/docs/platform-parts/container/container-integration.md index 33e886e6d..a41bdacf7 100644 --- a/docs/platform-parts/container/container-integration.md +++ b/docs/platform-parts/container/container-integration.md @@ -386,6 +386,18 @@ You can override the iOS deployment target version to use by setting `iosConfig` } ``` +You can run pod repo update before pod install by setting `podRepoUpdate` in the cauldron as show below. + +```json +{ + "containerGenerator": { + "iosConfig": { + "podRepoUpdate": true + } + } +} +``` + [1]: https://github.com/electrode-io/ern-container-transformer-xcframework [2]: https://github.com/electrode-io/ern-container-publisher-cocoapod-git [transform-container]: ../../cli/transform-container diff --git a/ern-container-gen-ios/src/IosGenerator.ts b/ern-container-gen-ios/src/IosGenerator.ts index 7eda2f71c..9e8066451 100644 --- a/ern-container-gen-ios/src/IosGenerator.ts +++ b/ern-container-gen-ios/src/IosGenerator.ts @@ -291,9 +291,16 @@ Make sure to run these commands before building the container.`, ? `_${ernConfig.get('podVersion')}_` : ''; - const podCmdArgs = [podVersionArg, 'install', '--verbose'].filter( - (x: string) => x !== '', - ); + const podRepoUpdateArg = config?.iosConfig?.podRepoUpdate + ? '--repo-update' + : ''; + + const podCmdArgs = [ + podVersionArg, + 'install', + podRepoUpdateArg, + '--verbose', + ].filter((x: string) => x !== ''); shell.pushd(config.outDir);