Hi,
I'm trying to compare two strings with each other on the iphone, but the IF statement is always false. Here's my code:
NSLog([[UIDevice currentDevice]uniqueIdentifier]);
if ([[[UIDevice currentDevice]uniqueIdentifier] compare:[[NSUserDefaults standardUserDefaults] valueForKey:@"id"]] == NSOrderedSame) {
//OK
NSLog("Do stuff if equal");
} else {
// Not OK
NSLog("Do stuff if not equal");
}
The output is always
*** UDID *** (<- my device's UDID)
Do stuff if not equal
What am I doing wrong?
Thanks! Yvan