In a completely new project using Objective-C, when using "NSDateFormatter" under the conditions mentioned, setting initWithLocaleIdentifier to "NSCalendarIdentifierGregorian" results in "dateFromString" returning nil. This issue is occurring specifically in iOS 18 beta 1 and 2, and it's causing me significant trouble.
This process works correctly on iOS 17 and earlier versions.
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setTimeStyle:NSDateFormatterFullStyle];
[formatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:NSCalendarIdentifierGregorian]];
[formatter setDateFormat:formatStr];
NSDate *date = [formatter dateFromString:formatStr];
"date" is nil.