This commit is contained in:
Alex Kim
2026-01-10 02:31:21 +11:00
parent fd2d420320
commit d1fdea76e8
8 changed files with 270 additions and 952 deletions

24
plugins/withGitPod.js Normal file
View File

@@ -0,0 +1,24 @@
const { withPodfile } = require("@expo/config-plugins");
const withGitPod = (config, { podName, podspecUrl }) => {
return withPodfile(config, (config) => {
const podfile = config.modResults.contents;
const podLine = ` pod '${podName}', :podspec => '${podspecUrl}'`;
// Check if already added
if (podfile.includes(podLine)) {
return config;
}
// Insert after "use_expo_modules!"
config.modResults.contents = podfile.replace(
"use_expo_modules!",
`use_expo_modules!\n${podLine}`,
);
return config;
});
};
module.exports = withGitPod;