Hello.
I'm Aleksandar Vacić, professional web developer and wine maker in the making.
Learn more about me or see what I can do for you.
While working on my iPhone app Quickie, I encountered one of many examples why you must always check your code on the actual device.
Quickie uses Core Data for storage and in one particular place I was comparing the NSString variable to a NSString–typed property of my CoreData class, QuickieList. Like this:
if (QuickieList.listName != theListName)
listName is defined as NSString and theListName is obviously that as well. In this particular instance, both of those had the value of “test”.
In the iPhone Simulator (running on 10.6.2) this comparison returned false, but on the iPhone running 3.1.2 it returned true. When changed into:
if (![QuickieList.listName isEqualToString:theListName])
result was the same.
Never – I repeat — never assume that simulator testing will be fine, even for seemingly small things. It can bite you when you least expect it.
Lots of ramblings on this blog...might be easier for you to find your juice through these tags:
Voices from the crowd
No comments posted yet. Your chance to be the first.