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

Projects
None yet
5 participants
@kylef
Contributor

kylef commented Apr 15, 2015

Allow support for pods with xcasset bundles using :path.

Closes #1549
Closes #3384
Closes #3358

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)

This comment has been minimized.

@segiddins

segiddins Apr 15, 2015

Member

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

@segiddins

segiddins Apr 15, 2015

Member

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

This comment has been minimized.

@kylef

kylef Apr 15, 2015

Contributor

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.

@kylef

kylef Apr 15, 2015

Contributor

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.

This comment has been minimized.

@segiddins

segiddins Apr 15, 2015

Member

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

@segiddins

segiddins Apr 15, 2015

Member

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

This comment has been minimized.

Show comment
Hide comment
@irace

irace 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 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

This comment has been minimized.

Show comment
Hide comment
@irace

irace 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

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

This comment has been minimized.

Show comment
Hide comment
@kylef

kylef Apr 15, 2015

Contributor

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

Contributor

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

[Copy Resources] Resolve various problems with xcasset bundles
Allow support for pods with xcasset bundles using `:path`.

Closes #1549
Closes #3384
Closes #3358

kylef added a commit that referenced this pull request Apr 15, 2015

Merge pull request #3405 from CocoaPods/kylef/xcasset-resources
[Copy Resources] Resolve various problems with xcasset bundles

@kylef kylef merged commit 31df15e into master Apr 15, 2015

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details

@kylef kylef deleted the kylef/xcasset-resources branch Apr 15, 2015

@irace

This comment has been minimized.

Show comment
Hide comment
@irace

irace Apr 15, 2015

@kylef Yep, got it. Thank you!

irace commented Apr 15, 2015

@kylef Yep, got it. Thank you!

@ayanonagon

This comment has been minimized.

Show comment
Hide comment
@ayanonagon

ayanonagon Apr 16, 2015

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

ayanonagon commented Apr 16, 2015

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

@yorkepb

This comment has been minimized.

Show comment
Hide comment
@yorkepb

yorkepb Apr 16, 2015

Works for NYTimes code base!! Thanks a lot!

yorkepb commented Apr 16, 2015

Works for NYTimes code base!! Thanks a lot!

@irace

This comment has been minimized.

Show comment
Hide comment
@irace

irace 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.

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

This comment has been minimized.

Show comment
Hide comment
@kylef

kylef Apr 16, 2015

Contributor

@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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@kylef

kylef Apr 16, 2015

Contributor

Scratch that, in the next few hours.

Contributor

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