@AARON PRICE BEHUNIN It seems that your app is crashing when running _hubClient.GetRegistrationsByChannelAsync()
under a release build. However, it works fine under a debug build. The error message you provided indicates that there is an issue with the serialization of the device token.
One possible reason for this issue is that the device token format has changed in Xcode 11, which could cause existing code to break. You may need to update the Azure Notification Hubs SDK to version 2.0.4 or newer to accommodate this change.
Another possible reason is that the device token is not being trimmed correctly. You can try modifying the following line of code:
var registration = new AppleRegistrationDescription(deviceToken.DebugDescription.Trim('<', '>').Replace(" ", string.Empty).ToUpperInvariant());
to:
var registration = new AppleRegistrationDescription(deviceToken.Description.Trim('<', '>').Replace(" ", string.Empty).ToUpperInvariant());
This should ensure that the device token is trimmed correctly.
Finally, wrapping the code in a try/catch block is a good way to avoid the crash, but it is important to investigate the root cause of the issue to ensure that it does not cause any other problems in the future.