cordova-common icon indicating copy to clipboard operation
cordova-common copied to clipboard

New method ConfigParser.getByName to find a resource containig a stri…

Open giuseppelanzi opened this issue 7 years ago • 3 comments

…ng in its src.

Needed to fix cordova-ios, which is erroneously using getBySize when more than one resource have the same dimensions.

giuseppelanzi avatar Mar 26 '18 10:03 giuseppelanzi

Where and why would this method be useful?

janpio avatar Nov 01 '18 20:11 janpio

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.

brody4hire avatar Dec 04 '18 17:12 brody4hire

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

giuseppelanzi avatar Dec 05 '18 07:12 giuseppelanzi