[myDictionary objectForKey:kYourKey];
is returning NSString Object, but following code:
if (![[myDictionary objectForKey:kYourKey] isEqualToString:@"<null>"])
{
//Conditional Code.
}
throws me out of the App. However the following works pretty fine :
NSString *tempStr = [NSString stringWithFormat:@"%@", [myDictionary objectForKey:kYourKey]];
if (![tempStr isEqualToString:@"<null>"])
{
//Conditional Code.
}
What is the difference, here?
Try
in the debugger, or
My guess is that the object is not an
NSString, but anNSNull.Edit: yep. I missed your last comment. It is indeed
NSNull.