Skip to content

Add Target option for copying frameworks when installing#912

Merged
yonaskolb merged 6 commits intoyonaskolb:masterfrom
jsorge:js/embedframeworks-copy-on-install
Jul 26, 2020
Merged

Add Target option for copying frameworks when installing#912
yonaskolb merged 6 commits intoyonaskolb:masterfrom
jsorge:js/embedframeworks-copy-on-install

Conversation

@jsorge
Copy link
Contributor

@jsorge jsorge commented Jul 21, 2020

There's a checkbox in a target's Embed Frameworks step that says "copy only when installing", and it defaults to un-selected. This PR adds the onlyCopyFilesOnInstall flag to Target which will check that box.

This resolves #608.

@jsorge jsorge changed the title Add Target option for copying options Add Target option for copying frameworks when installing Jul 21, 2020
@brentleyjones
Copy link
Collaborator

I'm happy to add some tests around this feature, but I couldn't find the right spot in the project to add them.

A good start is the fixture tests, so we can confirm the actual project output.

@jsorge
Copy link
Contributor Author

jsorge commented Jul 23, 2020

@brentleyjones Added a test case to parse the JSON dictionary as well as the flag to a target in our yaml sample. Not sure where to assert that the right changes in the resulting project file occurred though.

@yonaskolb
Copy link
Owner

Thanks @jsorge! It might be useful to also set a Run script only when installing on the Carthage build phase. Thoughts?

In terms of the fixture test, I can see that it led to a diff and that's enough. That's used a simple integration and snapshot test. Uncommitted diffs and compilation errors cause a failure on CI.
If you'd like to add a unit test that would be great too. Then you can assert the exact values.

Could you also add a changelog entry.

@jsorge
Copy link
Contributor Author

jsorge commented Jul 23, 2020

@yonaskolb Thanks for the feedback! Addressed everything except the Carthage build phase, since I'm not sure how that works. My mental model is to have this mirror Xcode's checkbox (which is linked in issue #608). How does Carthage interact with the "Embed Frameworks" build phase?

@yonaskolb
Copy link
Owner

@jsorge the generated Carthage build step basically extracts and copies the frameworks in, which is similar. I'm happy to leave this PR focused though. Thanks again!

@yonaskolb yonaskolb merged commit 331c3da into yonaskolb:master Jul 26, 2020
@elland
Copy link
Contributor

elland commented Aug 11, 2020

@jsorge thanks!

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.

Copy frameworks only when installing

4 participants

Comments