In the past I've used #if available
to isolate functionality gaps at the code level in my apps.
But yesterday I was trying to integrate the new methods Apple has made available for granting access to contacts, as discussed here: https://developer.apple.com/documentation/contacts/accessing-a-person-s-contact-data-using-contacts-and-contactsui
The problem is that their example is rife with code that won't compile for iOS 17, which is still (from the last stats I found) 20% of the user base.
I also experimented with @available; but when I was nearly done integrating the new methods, a compiler bug halted my entire project. It now simply doesn't build (the ol' non-zero exit code) with no further details or errors flagged. I filed a report, as requested in the logs.
In the meantime, I have to start over. What is the recommended method for isolating large blocks of functionality that are only available to a later OS version?