iOS 17 DateFormatter produces unknown characters instead of space for format "MMM dd, yyyy hh:mm a"

Is it known issue that Foundation.NSDateFormatter produces invisible characters after minutes value instead of space that are not in ISO-8859-1 in iOS 17 devices only?

Project compiled in xcode 14.3.1. Locale: en_US Timezone: CST

Reproduces all the times only on iOS 17 real devices, simulator, not sporadic. Issue does not reproduce on iOS 16.4, 16.5 devices.

Please, let me know if this is expected behavior and some other formatting API should be used in 2023 and beyond for iOS 17.

It sounds like you have encountered this behavior.

During our testing of iPadOS 17 Beta 4 and now 5, we have observed that DateTime objects appear to be initialized differently from what we had seen in iPadOS 16. Presently, we are running Xcode 14.3.1 with Xamarin.iOS v16.0.0.72, in Visual Studio for Mac 2022 v17.6.3 on a MacBook running Ventura 13.3.1 (although several combinations of different versions of these components have not resolved the issue). Examples of what we are seeing when creating DateTime variables:

In iPadOS 16, a typical DateTime (ToString()) shows as "7/27/2021 4:49:10 PM". In iPadOS 17 Beta, the same DateTime shows as "7/27/2021 4:49:10 a". A subsequent DateTime.Parse operation on the iPadOS 17 string leads to a "Format_UnknownDateTimeWord" exception in our application. The behavior is the same whether we are operating on a DateTime value from a database, or even just when creating a new DateTime object in code from scratch.

Is this an expected behavior in iPadOS 17, or is it a known issue that is expected to be resolved in a future iPadOS 17 Beta release, and/or Xcode / Xamarin.iOS update? We would like any feedback or suggestions on whether others have encountered the same behavior in iPadOS 17 Beta, and how this should be addressed if it is the new expected behavior.

Is this an expected behavior in iPadOS 17

It would have to be a bug in Xamarin.iOS. It may be related to the original issue in this thread, but that’s not a bug in iOS per se.

expected to be resolved in a future [...] Xamarin.iOS update?

There’s not much Xamarin expertise in this Apple forum. But a quick web search suggests that Xamarin is at EOL with no iOS 17 support coming. You’ll need to migrate to .NET MAUI to support iOS 17 and later.

iOS 17 DateFormatter produces unknown characters instead of space for format "MMM dd, yyyy hh:mm a"
 
 
Q