Get Updates By E-mail 

Article Written By:
Johann Dowa

Tutorial: Using Compiler Directives To Create Useful Custom Warning And Error Messages

  •  
  •  
  •  
  •  
  •  

Some time ago I mentioned a handy guide (way back in the iOS 4 days!) for using macros to accomodate users on different iOS versions.

Here’s a nice guide from Erica Sadun that provides a number of useful compiler directives customize the warnings and errors from Xcode’s clang compiler.

Among the tips you’ll find:

How to use a supplied build script allowing you to convert comments to warnings (great for todo/fixme)
Using a compatibility alias to create Mac or iOS specific code
Creating custom compiler warnings
Creating custom compiler errors
Disabling specific warnings

You can find guide over on the Informit site.

A nice guide to some little known but useful compiler directive tricks.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments