Skip to content

fix: fix the order of applying Podfiles #4579

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
May 8, 2019

Conversation

rosen-vladimirov
Copy link
Contributor

@rosen-vladimirov rosen-vladimirov commented May 2, 2019

Currently when CLI adds plugin's Podfile, it places its content at the top of the newly generated Podfile. Same happens for the post_install hook of the plugin. The last Podfile that is applied, is the one from App_Resources/iOS, but its content is also placed at the top of the merged Podfile and its post_install action (in case it has such) is executed first.
The idea of having Podfile in App_Resources/iOS was to be able to overwrite some settings from plugins Podfiles, for example SWIFT_VERSION.
To handle this, append each Podfile at the end of the merged Podfile. Same is valid for the post_install hook coming from a Podfile - it will be appended at end of the merged post_install function.

PR Checklist

What is the current behavior?

What is the new behavior?

Fixes issue #4512

Currently when CLI adds plugin's Podfile, it places its content at the top of the newly generated Podfile. Same happens for the post_install hook of the plugin. The last Podfile that is applied, is the one from App_Resources/iOS, but its content is also placed at the top of the merged Podfile and its post_install action (in case it has such) is executed first.
The idea of having Podfile in App_Resources/iOS was to be able to overwrite some settings from plugins Podfiles, for example SWIFT_VERSION.
To handle this, append each Podfile at the end of the merged Podfile. Same is valid for the post_install hook coming from a Podfile - it will be appended at end of the merged post_install function.
@rosen-vladimirov rosen-vladimirov added this to the 5.4.0 milestone May 2, 2019
@rosen-vladimirov rosen-vladimirov requested a review from Fatme May 2, 2019 14:32
@rosen-vladimirov rosen-vladimirov self-assigned this May 2, 2019
@cla-bot cla-bot bot added the cla: yes label May 2, 2019
@ghost ghost added the new PR label May 2, 2019
@rosen-vladimirov
Copy link
Contributor Author

test cli-smoke cli-plugin cli-templates cli-build

@rosen-vladimirov
Copy link
Contributor Author

test cli-templates

@rosen-vladimirov
Copy link
Contributor Author

test cli-templates

3 similar comments
@rosen-vladimirov
Copy link
Contributor Author

test cli-templates

@rosen-vladimirov
Copy link
Contributor Author

test cli-templates

@rosen-vladimirov
Copy link
Contributor Author

test cli-templates

@rosen-vladimirov rosen-vladimirov merged commit 2ea0b5e into master May 8, 2019
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/apply-cocoapods-correct-order branch May 8, 2019 14:13
@ghost ghost removed the new PR label May 8, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants