I'm new to iOS development. I get an error when I compare NSString
with NSString
nil value. It is not working in if condition.
my code is:
NSDictionary *responseFromJSON = [JSON objectForKey:@"response"];
NSString *strResponseMsg = [responseFromJSON objectForKey:@"104"];
if ([strResponseMsg isEqualToString:nil])
{
NSLog(@"login Invalid");
}
else
{
NSLog(@"login success");
}