The formatter returns nil if the given string doesn't correspond to the expected format. Your format string was almost right, you just needed to :
- Apostrophe should only be used for literals
- Milliseconds should be specified as 'SSS' and match the separation (use ss.SSS)
The correct format string is :
NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"];
NSDate *d = [df dateFromString:@"2014-03-26T05:07:42.14286Z"];