Software Archive
Read-only legacy content
17061 Discussions

Icon templates in the Asset Catalog

CAJazzer
Beginner
333 Views

I am using an excellent Cordova plugin for iOS Quick Actions found here

The plugin allows the addition of custom icons by specifying an Icon Template name.  The name specified corresponds to settings in the iOS "Asset Catalog".  It appears that Cordova supports Asset Catalogs, see this reference.  During the XDK build,  there is a CompileAssetCatalog step.  I do not understand how to declare an icon template name.  I assume it is somehow derived from the icon files referenced in an <icon definition in the intelxdk.config.additions.xml file. See this page for defining an icon.  

What I have tried defining in my intelxdk.config.additions.xml file is:

	 <icon src="icons/tvtouch.png" width="35" height="35" />
	 <icon src="icons/tvtouch@2x.png" width="70" height="70" />
	 <icon src="icons/tvtouch@3x.png" width="104" height="104" />

Not sure if the relative path should exist under the 'www' directory  or under the project root.  Also, not sure what determines the icon Template name.

Thanks for any help!

0 Kudos
2 Replies
PaulF_IntelCorp
Employee
333 Views

I am not an expert on the internals of Cordova CLI (which is what drives this feature), but it appears to me that all the changes to CLI are doing is copying your standard app icon and launch screens into an existing Xcode Assets Catalog, if an Assets Catalog exists in the Cordova CLI iOS platform files. See this Cordova CLI commit, which appears to be the key commit for Xcode Assets Catalog support (which came from here > https://issues.apache.org/jira/browse/CB-9665 < which was referenced from this master Jira > https://issues.apache.org/jira/browse/CB-8789 <).

Based on the comments in Eddy's plugin README.md file, my assumption is that his plugin is assuming the use of Cordova CLI, which provides direct access to the iOS Xcode project (within the Cordova project's "platforms" folder), into which you could then add an Assets Catalog (either manually or by using Xcode to open and modify that iOS Xcode project). I don't see any hook scripts or otherwise that will build that catalog in the project. One of the limitations of our cloud-based build system is no access to the "platforms" folders. Those folders are constructed at build time and are only available on our build system, you cannot see them, nor can you access them or modify them directly or through the additions.xml file.

BTW -- for anyone interested in understanding what an Assets Catalog is and where it's located in an Xcode project, this video is helpful > https://teamtreehouse.com/library/implementing-designs-for-iphone/implementing-custom-login-and-sign-up-screens/using-asset-catalogs-appicon-launchimage-and-more <

0 Kudos
CAJazzer
Beginner
333 Views

Thanks Paul.

From the log it appeared that only the pre-determined icons and splash screens were included, but just thought I would check.  Thank you for the quick response and additional info.

 

0 Kudos
Reply