Skip to content

Commit

Permalink
fix(cli): Put cordova git pod dependencies in Podfile (#4940)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile authored and elylucas committed Aug 24, 2021
1 parent b61aae8 commit a9216ac
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions cli/src/ios/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,28 @@ async function generatePodFile(
const cordovaPlugins = plugins.filter(
p => getPluginType(p, platform) === PluginType.Cordova,
);
cordovaPlugins.map(async p => {
const podspecs = getPlatformElement(p, platform, 'podspec');
podspecs.map((podspec: any) => {
podspec.pods.map((pPods: any) => {
pPods.pod.map((pod: any) => {
if (pod.$.git) {
let gitRef = '';
if (pod.$.tag) {
gitRef = `, :tag => '${pod.$.tag}'`;
} else if (pod.$.branch) {
gitRef = `, :branch => '${pod.$.branch}'`;
} else if (pod.$.commit) {
gitRef = `, :commit => '${pod.$.commit}'`;
}
pods.push(
` pod '${pod.$.name}', :git => '${pod.$.git}'${gitRef}\n`,
);
}
});
});
});
});
const noPodPlugins = cordovaPlugins.filter(filterNoPods);
if (noPodPlugins.length > 0) {
pods.push(
Expand Down

0 comments on commit a9216ac

Please sign in to comment.