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

[Copy Resources] Resolve various problems with xcasset bundles #3405

Merged
merged 1 commit into from Apr 15, 2015

Conversation

kylef
Copy link
Contributor

@kylef kylef commented Apr 15, 2015

Allow support for pods with xcasset bundles using :path.

Closes #1549
Closes #3384
Closes #3358

@kylef kylef added t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome! d1:easy An easy ticket that is a good start for first-time contributors s4:awaiting validation A Pull Request that is waiting for validation by a CocoaPods Core Team member labels Apr 15, 2015
echo $XCASSET_FILES | xargs actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"

# Find all other xcassets (this unfortunately includes those of path pods and other targets).
OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d)
Copy link
Member

Choose a reason for hiding this comment

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

so this still won't work if your project contains XCAssets outside of $SRCROOT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct, but would you ever have XCAssets outside of $SRCROOT?

We never supported this before, this should restore 0.35.0 behaviour but also not include assets for other build configurations/pods that are not used in the current target/configuration.

Copy link
Member

Choose a reason for hiding this comment

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

I know we've never supported it, but Xcode technically allows you you have source files from anywhere on disk. Just thought I'd bring it up

@irace
Copy link

irace commented Apr 15, 2015

Tried pulling this into Tumblr and at first glance, it does appear to fix that issues that have kept us from upgrading to 0.36 👏

@irace
Copy link

irace commented Apr 15, 2015

(Don’t want to paste our whole Podfile here if can be avoided, but) I’m getting the following error when using this branch trying to add use_frameworks! to a single target. No idea if it’s a problem in 0.36.0 or specific to this branch.

NoMethodError - undefined method `module_map' for #<Pod::Specification name="BRYEqualsBuilder">
/Users/bryan/.bundler/ruby/2.0.0/CocoaPods-0c3ccbcef220/lib/cocoapods/sandbox/file_accessor.rb:218:in `module_map'
/Users/bryan/.bundler/ruby/2.0.0/CocoaPods-0c3ccbcef220/lib/cocoapods/installer/target_installer/pod_target_installer.rb:248:in `create_module_map'
/Users/bryan/.bundler/ruby/2.0.0/CocoaPods-0c3ccbcef220/lib/cocoapods/installer/target_installer/pod_target_installer.rb:25:in `block in install!'
/Users/bryan/.bundler/ruby/2.0.0/CocoaPods-0c3ccbcef220/lib/cocoapods/user_interface.rb:110:in `message'
/Users/bryan/.bundler/ruby/2.0.0/CocoaPods-0c3ccbcef220/lib/cocoapods/installer/target_installer/pod_target_installer.rb:17:in `install!'
/Users/bryan/.bundler/ruby/2.0.0/CocoaPods-0c3ccbcef220/lib/cocoapods/installer.rb:499:in `block (2 levels) in install_libraries'
/Users/bryan/.bundler/ruby/2.0.0/CocoaPods-0c3ccbcef220/lib/cocoapods/installer.rb:496:in `each'
/Users/bryan/.bundler/ruby/2.0.0/CocoaPods-0c3ccbcef220/lib/cocoapods/installer.rb:496:in `block in install_libraries'
/Users/bryan/.bundler/ruby/2.0.0/CocoaPods-0c3ccbcef220/lib/cocoapods/user_interface.rb:110:in `message'
/Users/bryan/.bundler/ruby/2.0.0/CocoaPods-0c3ccbcef220/lib/cocoapods/installer.rb:495:in `install_libraries'
/Users/bryan/.bundler/ruby/2.0.0/CocoaPods-0c3ccbcef220/lib/cocoapods/installer.rb:131:in `block in generate_pods_project'
/Users/bryan/.bundler/ruby/2.0.0/CocoaPods-0c3ccbcef220/lib/cocoapods/user_interface.rb:49:in `section'
/Users/bryan/.bundler/ruby/2.0.0/CocoaPods-0c3ccbcef220/lib/cocoapods/installer.rb:128:in `generate_pods_project'
/Users/bryan/.bundler/ruby/2.0.0/CocoaPods-0c3ccbcef220/lib/cocoapods/installer.rb:96:in `install!'
/Users/bryan/.bundler/ruby/2.0.0/CocoaPods-0c3ccbcef220/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
/Users/bryan/.bundler/ruby/2.0.0/CocoaPods-0c3ccbcef220/lib/cocoapods/command/project.rb:101:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.8.1/lib/claide/command.rb:312:in `run'
/Users/bryan/.bundler/ruby/2.0.0/CocoaPods-0c3ccbcef220/lib/cocoapods/command.rb:46:in `run'
/Users/bryan/.bundler/ruby/2.0.0/CocoaPods-0c3ccbcef220/bin/pod:44:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/bin/pod:23:in `load'
/Library/Ruby/Gems/2.0.0/bin/pod:23:in `<main>'

Our project’s platform support is:

platform :ios, '7.1'

The target I’m modifying to try and build frameworks for is:

target :share_extension do
  platform :ios, '8.0'
  use_frameworks!

  link_with 'Share'

  pod 'SomePod'
  pod 'SomeOtherPod'
end

This is the pod it doesn’t seem to like: BRYEqualsBuilder

@kylef
Copy link
Contributor Author

kylef commented Apr 15, 2015

@irace that's because the branch you've pulled down will also require changes from the master of http://github.com/CocoaPods/Core

Allow support for pods with xcasset bundles using `:path`.

Closes #1549
Closes #3384
Closes #3358
@kylef kylef removed the s4:awaiting validation A Pull Request that is waiting for validation by a CocoaPods Core Team member label Apr 15, 2015
kylef added a commit that referenced this pull request Apr 15, 2015
[Copy Resources] Resolve various problems with xcasset bundles
@kylef kylef merged commit 31df15e into master Apr 15, 2015
@kylef kylef deleted the kylef/xcasset-resources branch April 15, 2015 22:03
@irace
Copy link

irace commented Apr 15, 2015

@kylef Yep, got it. Thank you!

@ayanonagon
Copy link

Works for Venmo codebase as well, thanks! Excited to start using 0.36. :octocat: 🎊

@yorkepb
Copy link

yorkepb commented Apr 16, 2015

Works for NYTimes code base!! Thanks a lot!

@irace
Copy link

irace commented Apr 16, 2015

@kylef I’m sure it’s hard to say, but do you have any rough idea of when this will hit a production version? Mulling whether or not we want to wait or merge my changes that use this branch into our application.

@kylef
Copy link
Contributor Author

kylef commented Apr 16, 2015

@irace, at the latest. There will be a patch release tomorrow. Potentially today but have a lot of other things I would we to take care of first.

@kylef
Copy link
Contributor Author

kylef commented Apr 16, 2015

Scratch that, in the next few hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
d1:easy An easy ticket that is a good start for first-time contributors t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

高仿微博 Getting .xcassets compilation to work for development pods?
5 participants