I'm trying to get my macOS project all updated for Swift 4, but I'm running into a problem trying to reference CBPeripheral.identifier. It looks like, as of Swift 4, this property is now attributed with "@available(OSX 10.13, *)" (it's actually from the CBPeer protocol). I can no longer target earlier versions of macOS when using `identifier`, and I can find no suitable replacement for using identifier. It looks like this has been the case since Xcode 9 was released, so I'm wondering if this change is intentional?
Ironically, the documentation still seems to show that `identifier` is the correct mechanism for differentiating peripherals:
"The
CBPeripheral
class represents remote peripheral devices that your app—by means of a central manager (an instance of CBCentralManager
)—has discovered advertising or is currently connected to. Peripherals are identified by universally unique identifiers (UUIDs), represented by NSUUID
objects. Peripherals may contain one or more services or provide useful information about their connected signal strength."Any advice on what I should be using if I want to target 10.12, but build with Swift 4?