Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replace variables in Podfile #752

Closed
wants to merge 2 commits into from

Conversation

jcesarmobile
Copy link
Member

@jcesarmobile jcesarmobile commented Dec 18, 2019

closes #721

Platforms affected

ios

Motivation and Context

see #721

Description

replaces variables with the variable value

Testing

plugin for testing with variables in both podspec and framework
https://github.com/jcesarmobile/cordova-plugin-firebase-dynamiclinks

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@@ -406,10 +407,11 @@ Api.prototype.addPodSpecs = function (plugin, podSpecs, frameworkPods) {
events.emit('warn', '"framework" tag with type "podspec" is deprecated and will be removed. Please use the "podspec" tag.');
events.emit('verbose', 'Adding pods since the plugin contained <framework>(s) with type="podspec"');
frameworkPods.forEach(function (obj) {
var spec = obj.spec.includes('$') ? installOptions.variables[obj.spec.replace('$', '')] : obj.spec;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like repeated code. I wonder if we could factor this out somehow?

@jcesarmobile
Copy link
Member Author

replaced with #754 since this had conflicts and was missing the uninstall case, also followed the recommendation of reuse a function.

@jcesarmobile jcesarmobile deleted the variables-pods branch December 19, 2019 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Variable specified in podspec pods are not getting replaced
2 participants