Instance method not found (return type defaults to id)

ios, iphone, objective-c, xcode

Solution

in your DeviceList.h , make sure you have

@interface DeviceList : Parent
- (NSString*) getListId;
..
..
@end

the warning occurs when your method is not declared in your header file and you try to call it outside your (self) class.

Problem

I am taking a warning from Xcode. Here is the code ``` DeviceList *dList = (DeviceList* )[[User thisUser] devices]; [dList getListId]; ``` The warning states that instance method -getListId is not found. However the method exists in my source code ``` - (NSString*) getListId { T if ( ... != nil) { return ...; } else { return @""; } } ``` I cannot figure out what the problem is when I am calling the method.

Original source