Reputation: 1328
I am getting the warning Class method '+getInsuredDOB' not found (return type defaults to 'id') from XCode. I have already declared the method in my .h file. I can't figure out why there is a warning.
Here is my .h file
@interface Sample : NSObject
{
}
+ (NSString*) getInsuredDOB;
Here is my .m file
@implementation Sample
+ (NSString*) getInsuredDOB
{
return @"Testing";
}
@end
Here is where I use the class method and where the warning is.
#import "Sample.h"
NSLog(@"DOB is %@",[Sample getInsuredDOB]); //Warning here
Any help would be much appreciated. Thank you.
Upvotes: 1
Views: 3239
Reputation: 122391
There is nothing wrong with your code, and once you've compiled it Xcode will accept that the method exists and is valid and the warning will disappear.
Upvotes: 3