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?

Answers


The method belongs to category NSManagedObject (ActiveRecord), not RKObjectManager (RKTableController). I messed up "RK" prefix with "NS" prefix. So embarassing.. lol, problem fixed.


Need Your Help

Strange error in SpringMVC Application Startup

java tomcat spring-mvc

I'm getting a very strange stack trace when trying to load a SpringMVC application and at a lost to why this is occurring.

How do you create a Tray icon with FireMonkey?

delphi firemonkey trayicon systray

With the new FireMonkey cross-platform tool, how does one create a tray icon? With Delphi it used to be TTrayIcon.