I'm passing a string from javascript to Objective-C in the form of "2012-02-17 14:21:30 +0000". My code is as follows:
NSString *firingDate = [_parameters objectForKey:@"fire"];
NSDate *notificationDate = [NSDate dateWithString:firingDate];
The issue is that I ended up reading the OS X reference instead of the iOS docs (doh!) so this throws a warning as dateWithString isn't present in iOS. In theory I suppose that this shouldn't work at all but it does, albeit with that warning.
What is the Correct way to convert the string to a NSDate?