New method ConfigParser.getByName to find a resource containig a stri…
…ng in its src.
Needed to fix cordova-ios, which is erroneously using getBySize when more than one resource have the same dimensions.
Where and why would this method be useful?
Where and why would this method be useful?
I would favor closing this PR if we do not get this question answered soon. I left a review to avoid a premature merge.
I added it while I was using [email protected] (which I still use a fork of) because getting resource by size is ambiguous: [email protected] has the same size of [email protected].
The [email protected] was missing in my builds because of the mapIconResources method in prepare.js file which defines two resources with same size.
I forked cordova-ios and changed prepare.js removing the resources for apple watch, but it would be more correct to be able to look for a resource by name. https://github.com/giuseppelanzi/cordova-ios/blob/834cd16d13a5badda80049c2f62a3b60b393c15b/bin/templates/scripts/cordova/lib/prepare.js
The current prepare.js still has the issue https://github.com/apache/cordova-ios/blob/master/bin/templates/scripts/cordova/lib/prepare.js