Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Validate resources and generate getter code for iOS app in Xcode

I’m looking for a tool that can validate my images and fonts in a iOS application.

Problem:

We have a lot of different images and fonts in our application. Sometimes some of those files are replaced or renamed. We don’t get compile warnings or errors just missing images scattered around the app.

I guess this is part of Objective C dynamic nature but I would really like some static check here.

Does there exist any tools that can validate content or autogenerate getter code? (preferable open source)

Thanks!

like image 873
vedion Avatar asked Apr 29 '14 08:04

vedion


1 Answers

warning: Shameless self promovation ahead:

We have created a tool, IDAssetManager, (not open source, however), that creates a static interface to resources. This tool integrates heavily with Xcode. It manages and organizes resources, and generates a class with getter code for images, font and colors.

It also comes with a Xcode plugin that allow you to preview images directly from the Xcode codeview:

enter image description here

The tool will also register fonts in the info.plist file.

To get the kind of validation you are looking for you will have to:

  1. Add all images to IDAsssetManager
  2. Use the getter code generated by the tool
  3. Hit the refresh button on the tool.

You will now get compile warnings for all missing resources.

You can try it here: https://itunes.apple.com/us/app/idassetmanager-lite-for-xcode/id830464758?mt=12

Edit

You can see a video of the tool in action here

like image 78
EsbenB Avatar answered Nov 14 '22 23:11

EsbenB