CocoaPods/CocoaPods — pull request #2938 by joelparsons (2014-12-12 17:11:20+00:00)
Title: [Generator] Script was compiling all XCAsset files found in the project path

I have a project with multiple targets, an App target and a Framework target. They are in the same XCWorkspace. Both the Framework and the App link against various pods.

When this scrip runs to copy the pods resources it searched for all the XCAssets files in the current working directory of the script which is the project directory.

As a result ALL the assets from the app were being compiled into the framework target and all asset libraries were being compiled into the app

The issue compounds when there is more than one app target in the project and the developer uses per target asset catalogues. If files in the per target asset catalogs have the same names this script will compile them all in resulting in the image any particular app target uses being undefined.

This pull request fixes these scenarios by only searching the PODS_ROOT folder for asset catalogs from pods (surely the desired effect) and as the asset compiler is additive (it adds files to an already existing .car file) while the script does not determine which pods you're actually linking to at any particular point we at least avoid doubling up the assets in the project in the framework (if there is one)

I couldn't find a spec for this part of the script so I haven't made a spec change. Please give me a pointer if this is needed. Thanks :)