Reads your .xcassets
directory and generates functions, categories, or constants. Supports both Swift and Objective-C, and allows custom templates.
$ pip install imageset
Just run:
$ imageset --help
For details. The category/extension mode seems best to me.