Yes, this code works as expected in all earlier version of iOS. The function expects a return of the SecKeyRef. In the earlier iOS, the SecKeyRef is always returned but it is not in this. Yes, a feedback ticket with the relevant snippet and logs have been submitted here: https://feedbackassistant.apple.com/feedback/13879236
There are plans on our end to migrate to the newer APIs, but in the meanwhile, we do need this code to work as expected in our existing products to minimise customer impact.