Note that there are some explanatory texts on larger screens.

plurals
  1. POARC Semantic Issue: No visible @interface for Class declares the selector
    primarykey
    data
    text
    <p>Pretty basic stuff but i am unable to troubleshoot where the problem is. In my project, i have a class named "TheFeedStore" with following two methods:</p> <pre><code>- (BOOL)hasItemBeenRead:(RSSItem *)item { ............ } - (void)markItemAsRead:(RSSItem *)item { ......... } </code></pre> <p>I am using the following class method so other classes can access these methods using it:</p> <pre><code>+ (TheFeedStore *) sharedStore { static TheFeedStore *feedStore = nil; if (!feedStore) { feedStore = [[TheFeedStore alloc] init]; } return feedStore; } </code></pre> <p>In one of my another class, i can easily access the above methods by writing </p> <pre><code>if ([[TheFeedStore sharedStore] hasItemBeenRead:item]) </code></pre> <p>or</p> <pre><code>[[TheFeedStore sharedStore] markItemAsRead:entry]; </code></pre> <p>But in another class if i try to access these methods in a similar manner, i get the error "No visible @interface for 'TheFeedStore' declares the selector 'hasItemBeenRead:"</p> <blockquote> <p>1) I have imported TheFeedStore.h file in the classes from i am accessing these methods of TheFeedStore class.</p> <p>2) I have checked like 10 times and there is no typo.</p> <p>3) The methods i am accessing are also declared in the header file of TheFeedStore.h</p> </blockquote> <p><strong>UPDATE:</strong> Just to check, i have declared another test method in TheFeedStore.h, same result, one class can access the newly created method while rest of the three classes cannot.</p> <p><strong>UPDATE:</strong> I have tried creating more methods in the TheFeedStore.h just for troubleshooting this issue. The new methods are also not accessible from the other classes. But if the return type of these new methods is (RSSChannel*) which is another model class in my project, than they become accessible. If their return type is other than some class like (void) and (BOOL) then they are not accessible. Here is my TheFeedStore.h <a href="https://gist.github.com/jessicamoore112/5558473" rel="noreferrer">https://gist.github.com/jessicamoore112/5558473</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload