Setting assets catalog from config file


#1

Hi

I am working on several cross platform projects. I use the Introjucer and I have buildservers to build my code when I commit it.

The code has to be build for macOS, Windows and iOS. For the iOS build I have all the app icons and launch images in an assets catalog that I would like to use.

My problem is, that whenever I run the Introjucer the xcode project is set to not use the assets catalog (as expected). It would be very nice if I could somehow change this from a config file I have allready. I use this config file to set the provisioning profiles and signing identities and this works just fine.

I have added these lines to the config file:

ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage

ICON_FILE_PATH = ProductName/Images

But it does not work.

Any help is highly appreciated.

Have a nice christmas

John Parbo Andersen


#2

I actually have no idea what the asset catalog is.. Sounds like something that the introjucer should automate, but it'd take me some research to figure out what it's all about. If you're in a hurry, then suggesting some mods to the intojucer yourself that make it work would be helpful!


#3

Hi Jules

 

Thank you for your response. The assets catalog is the "new" way of handling stuff like the icons and launch images for iOS builds (not sure if its also how its done for macOS).  The assets catalog is just a folder with your images in, that can be shared between projects. If you add and assets catalog form within xcode build settings for your target, you can see what lines are added to the project file. Some of these are for adding the files to your projects source tree and then you will also see the same lines added, as those I have tried to get to work from the config file. 

My guess is that these are the lines that needs to be added by the introjucer. If the user (of the Introjucer) dont have an assets catalog the Introjucer could create an empty one (or one with the Introjucer logo in all the required sizes,  and then the user can replace these if needed) or otherwise it could be possible to state what existing catalog to use?

Then we could also have a nice icon for the Juce demo on iOS!

Hope this helps

Best regards

John


#4

Ok, thanks. Not sure when I'll have chance to have a look into it, but will put it on the to-do list..


#5

Great, let me know if you run into problems, then I will try to help. 

Have a very nice christmas

John


#6

plus one on this ... I'm having the same issue with my assets catalog getting lost every time I save my project from Introjucer. This would be a super useful improvement. now that I'm getting close to actually submitting an app, this is becoming a bit maddening. As John suggests, perhaps the easy fix is to just have Introjucer allow the user to point to an assets catalog to use rather than doing something more fancy (although I like the idea of Introjucer creating a default Assets Catalog too, but that might be overkill since xCode makes generating an assets catalog pretty darn simple). 

 


#7

This would a massively useful feature for all future iOS development. Not sure if there is a good way to handle the different sizes of launch images and app icons using introjucer.


#8

This happens to me as well. Maybe something has been introduced that I haven’t found?


#9

Is it correct that this issue is still not resolved? If I may make a suggestion: it would be really great if there was a way to give the projucer a high resolution version (e.g. 1024x1024 like the iTunes Artwork) of the app icon and have all the small icon bitmaps generated automatically. That would actually even save time compared to what XCode normally wants you to do. But simply not messing up the appicon asset catalog all the time would already be a big help, too.