Reputation: 1587
I am developing an app that will use a large number of images (thousands). These assets are created in Inkscape then programmatically rendered into 1x and 2x images for iPad and 1x, 2x and 3x for iPhone. This all works well.
Now I want to move these images into an asset catalog so as to take advantage of thinning.
Is there a nice way to programmatically add all of these images into an asset catalog or do I just have to do the hard work of generating the catalog file?
Since I already have a program to generate the images (and create a matching metadata file) for the project, I have no problem writing code to update catalog; I just want to do it the right way.
Upvotes: 2
Views: 578
Reputation: 1385
Asset catalogs are just folders with json files that describes the content, you can easily create a shell or a swift script that can generate those files. Here is an example of a script dealing with asset catalogs (not exactly what you are looking for though) https://github.com/freshOS/AssetChecker
Upvotes: 2