my objective C app compiles successfully, but i get an Xcode warning:
Instance method '-objectFromJSONData' not found (return type defaults to 'id')
on this line:
NSDictionary *userInfo = [data objectFromJSONData];
How can i get rid of that warning?
When you make a custom class or use a class built outside of apple, you need to import the headers for the framework or class you are using. This allows the compiler to cross check return types and so forth.
When you attempt to send valid messages (but the compiler is unaware of) you will get that warning. The code should run and work with the warning there, but I am glad you want to get rid of the warning.
in the same .m file as the code you posted... near the top... add
You need to
#import
the header file where that method is declared. And you need to make sure thatdata
is of a class for which the method is defined.