tomaz/appledoc — Issue #151: #if statement in header file leads to incomplete parsing
Author: Tafkadasoh
Created: 2011-11-24 11:56:06+00:00
State: open

I'm developing a library for my company which uses Apple's AVFoundation framework. As AVFoundation isn't available for the iOS Simulator, I have to dynamically exclude some lines of code from my headers when compiling for Simulator, which I accomplished by adding some #if checks.

Unfortunately, these checks will break the appledoc parsing. In my example, the method documentation of the class is lacking, and the protocol defined & documented at the bottom of the same header file is also missing.

The problem orginiates due to the following lines:
#if !(TARGET_IPHONE_SIMULATOR)
@interface NEOMViewfinderViewController : UIViewController {
#else
@interface NEOMViewfinderViewController : UIViewController {
#endif

As it's probably very elaborate/complex to correctly parse #if checks, it would be sufficient (in my opinion) to get an error or warning in the appledoc log.

P.S.: I really like your project. Keep up the good work!