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.
have you added a declaration for this method in the .h file, and if so, have you imported the .h into the file you are trying to call this method?
this error is basically the compiler saying it can't find the method declaration, so it doesn't know what to expect the return type to be.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With