Can I simply use
if(myString == nil)
For some reason a string that I know is null, is failing this statement.
Can I simply use
if(myString == nil)
For some reason a string that I know is null, is failing this statement.
Is it possible that your string is not in fact nil
, and is instead just an empty string? You could try testing whether [myString length] == 0
.
That was my thought at first, but indeed it is reporting to null. See the following screenshot: http://screencast.com/t/6hQzWmPm62
It seems that my string in the debugger was reporting as (null) but that was due to how it was being assigned, I fixed it and now it is reporting as nil. This fixed my issue.
Thanks!