Posts

Post not yet marked as solved
0 Replies
623 Views
I have a string that has date and time. When trying to convert the string to NSDate, it is getting nil and App Crashes. It is working fine with another iOS version 13, 13.1 and 13.2. It is only crashing in iOS 13.3.Code Snippet :NSString *startDateString = @"01-04-2020 8:00pm" ;NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; dateFormatter.dateFormat = @"MM-dd-yyyy h:mma"; NSDate *startDate = [dateFormatter dateFromString:startDateString];In the above-mentioned code when I debug startDate is getting nil in iOS 13.3 but it is working fine with lower iOS versions.
Posted Last updated
.