Xcode: how to know a header file is actually imported?
To be specific, I am using RestKit framework. I want to use a framework class category called RKObjectManager+RKTableController in my view controller mainTVC. Here is my #import section in mainTVC.m:
// framework headers, which should be enough #import <RestKit/RestKit.h> #import <RestKit/UI.h> // my project headers, not relating to framework #import "MainTVC.h" #import "Photo.h" // Do this to guarantee import does happen. But still got error, see below #import <RestKit/RKObjectManager+RKTableController.h>
However, Xcode issue an error:
No known class method for selector 'fetchRequest:groupedBy:inContext:'
For reference, this method is a class method declared only in category header RKObjectManager+RKTableController.h, but not in 'RKObjectManager.h`.
Also, I added -ObjC and -all_load to "other linker flags" in build settings, if that's relevant.
I suspect the error is caused by the fact that category header is not actually imported somehow. How can I verify that? Or the error is caused by other reasons that I am not aware of. What am I doing wrong?
The method belongs to category NSManagedObject (ActiveRecord), not RKObjectManager (RKTableController). I messed up "RK" prefix with "NS" prefix. So embarassing.. lol, problem fixed.