This method is indicated in the documentation marked only on the Mac OSX page, not on iOS. Why Apple has different versions is not clear to me, but they, fortunately, answer the same.
Since the class reference for iOS says that there is no such method for iOS NSDate, you will receive a warning. However, your code will respond perfectly.
To turn off the warning, you really have to use NSDateFormatter.
Hello,
Jacco
Jacco Oct 18 2018-11-11T00: 00Z
source share