Post

Replies

Boosts

Views

Activity

Reply to dateFromString results in nil
I made a mistake in the writing. With this, the date will become nil. NSString *format = @"yyyyMMdd"; NSString *formatStr = @"20240619"; NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; [formatter setTimeStyle:NSDateFormatterFullStyle]; [formatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:NSCalendarIdentifierGregorian]]; [formatter setDateFormat:format]; NSDate *date = [formatter dateFromString:formatStr];
Jul ’24
Reply to dateFromString results in nil
I was able to resolve it using the method you suggested. Thank you very much. However, the issue of becoming nil in iOS 18 beta 4 no longer occurs. Ultimately, is this issue specific to beta versions? Should we revert to our previous solution of setting NSCalendarIdentifierGregorian?
Jul ’24