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

Drop the copy resources script and use an PBXCopyFilesBuildPhase #545

Closed
fabiopelosin opened this issue Sep 22, 2012 · 9 comments
Closed
Labels
t1:enhancement Enhancements that have not been picked up yet. Please comment if you plan to work on it

Comments

@fabiopelosin
Copy link
Member

The copy script is bad because:

  • Xcode doesn't simply copies the files but also processes them. Examples are plist binary conversion, and images optimization.
  • It is not easy to understand what is being copied in the bundle.
  • Xcode copies the resources only when they change, making the build noticeably faster.
  • Svn dirs create problems.

The solution is to modify the user project and add a PBXCopyFilesBuildPhase, under our control.

@xslim
Copy link
Contributor

xslim commented Oct 4, 2012

Good idea! does https://github.com/CocoaPods/Xcodeproj supports something like target.copy_resources_build_phases.new ?

@fabiopelosin
Copy link
Member Author

I'm giving right now a test to CocoaPods/Xcodeproj#30.

@xslim
Copy link
Contributor

xslim commented Oct 4, 2012

If we'll use PBXResourcesBuildPhase than we'll need to add relative link for every resource in our main project…
Like making a group "VendorResources" and putting all them there. Is this correct behavior?

@xslim
Copy link
Contributor

xslim commented Oct 4, 2012

And maybe also create a configuration parameter in Podfile that can have copy_resources_type = script | integrate or something similar….

@fabiopelosin
Copy link
Member Author

If we'll use PBXResourcesBuildPhase than we'll need to add relative link for every resource in our main project…
Like making a group "VendorResources" and putting all them there. Is this correct behavior?

I think so. We need a group that we can trash on each call to install. Are you working on this?

And maybe also create a configuration parameter in Podfile that can have copy_resources_type = script | integrate or something similar….

Mhmm, I don't think that it is needed. I guess that the script was there because Xcodeproj was not mature enough, and I can't think of any case were it would be preferable.

@xslim
Copy link
Contributor

xslim commented Oct 4, 2012

I'm playing with this (looking thru the code) without any deadline in mind

@xslim
Copy link
Contributor

xslim commented Oct 4, 2012

I'm trying to hack locally Xcodeproj gem, trying to load the local, hacked copy in ruby console - but no luck. Any links how to do this?
I tried gem 'xcodeproj', path: '/Users/slim/src/tools/Xcodeproj/Gemfile', tried load '/Users/slim/src/tools/Xcodeproj/lib/xcodeproj, etc, and still it uses the system gem files :(

@fabiopelosin
Copy link
Member Author

Maybe the .irbrc from this article might help you http://lucapette.com/pry/pry-everywhere/.

@fabiopelosin
Copy link
Member Author

Closing in favor of #743

jzapater pushed a commit to jzapater/CocoaPods that referenced this issue Sep 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t1:enhancement Enhancements that have not been picked up yet. Please comment if you plan to work on it
Projects
None yet
Development

No branches or pull requests

2 participants