Icons were not fully integrated into the catalog project and the relevant
scripts were out of date. This PR addressed the following issues:
* The Icons source files had been hand-modified and did not match the
script outputs.
* The Icons unit tests were not included in the Catalog or Dragons
projects.
It addresses these issues through the following:
* Updates `scripts/sync_icons.sh` to:
- Match the copyright header format used by the project.
- Run clang-format on each generated source file.
- Add Icons unit tests to the MaterialComponents podspec.
- Remove duplicate import of `MaterialIcons.h` in the source
implementation files.
* Adds the Icons unit test targets to the Catalog and Dragons Xcode schemes.
Discovered while working on #8498
* [Icons] Add icon method for use with imageNamed
Icon images are currently loaded manually from a path in a bundle and therefore bypass the internal UIImage caching mechanism. This change will add new methods that provide the icon images via the -imageNamed family of methods.
Closes#1637, #1606
We can credit any contributor who would like to be credited this way, by adding them on request to the AUTHORS file. The copyright statement changes are required for this to work. Note that this has...
Summary:
We can credit any contributor who would like to be credited this way, by adding them on request to the AUTHORS file. The copyright statement changes are required for this to work. Note that this has no legal change, since the contributors always retained their copyright despite the copyright notice, but it's a nice acknowledgement.
Changed copyright statement to include non-Google authors.
Command run:
find * \( -name '*\.m' -or -name '*\.h' -or -name '*\.swift' \) -and -not \( -path 'scripts/external*' -name Pods \) -print0 | xargs -0 sed -i '' 's/Copyright \(.*\) Google Inc/Copyright \1 the Material Components for iOS authors/'
Added non-source files.
Command run:
grep -Rl 'Copyright .* Google Inc' * --exclude-dir scripts/external --null | xargs -0 sed -i '' 's/Copyright \(.*\) Google Inc/Copyright \1 the Material Components for iOS authors/'
Reviewers: featherless, O1 Material components iOS, randallli
Reviewed By: O1 Material components iOS, randallli
Tags: #material_components_ios
Differential Revision: http://codereview.cc/D1415
Summary:
DO NOT LAND until after we have finalized our May 25 2016 release.
Cocoapods 1.0.0 was used to generate Pod* and xcode* files.
These changes are NOT compatible with 0.39.0.
These changes may NOT be compatible with version of Xcode 7.2 and earlier.
pod lib lint generates a list of issues that should be addressed.
--OLD INFO--
Cocoapods 0.39 was used to generate the Podfile.locks.
MaterialComponents - Build properly
MaterialUnitTests - Test properly
MaterialCatalog - Fails to Build
The errors (cut after the first 20) are similar to:
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/MaterialComponentsCatalog-umbrella.h"
^
/Users/iangordon/projects/material-components-ios/catalog/Pods/Target Support Files/MaterialComponentsCatalog/MaterialComponentsCatalog-umbrella.h:10:9: note: in file included from /Users/iangordon/projects/material-components-ios/catalog/Pods/Target Support Files/MaterialComponentsCatalog/MaterialComponentsCatalog-umbrella.h:10:
#import "CollectionCellsLayoutExample.h"
....
Reviewers: featherless, randallli, ajsecord, #material_components_ios
Reviewed By: featherless, randallli, ajsecord, #material_components_ios
Tags: #material_components_ios
Differential Revision: http://codereview.cc/D873
Summary:
Assets catalogs require to use imageNamed:. Since we want Icons to let clients
handle the caching, we only provide the path for the resource in our bundle.
Closes https://github.com/google/material-components-ios/issues/467.
Test Plan:
Build the catalog and verify that CollectionCells' accessory images are
displayed correctly for all resolutions and configurations.
Reviewers: ajsecord, #mdc_ios_owners
Reviewed By: ajsecord, #mdc_ios_owners
Subscribers: featherless
Projects: #material_components_ios
Differential Revision: http://codereview.cc/D793
Summary: In order for Icon targets to import this header the header can't be truly private.
Reviewers: #mdc_ios_owners, randallli
Reviewed By: #mdc_ios_owners, randallli
Projects: #material_components_ios
Differential Revision: http://codereview.cc/D340