Skip to content

API cleanup

Choose a tag to compare

@gabors gabors released this 31 Oct 01:19
· 32 commits to master since this release

Breaking changes:

  • The running-system details are static, since they describe the device the code runs on, not a looked-up Device: Device.operatingSystemName, operatingSystemVersion, operatingSystemVersionString, physicalMemory, processorCount, systemUptime and the volume…Capacity properties. Replace Device.current.physicalMemory with Device.physicalMemory.
  • Mac.find(model:) is no longer public. Use Device(modelIdentifier:).mac.
  • Mac.models is renamed Mac.modelIdentifiers, matching Device.modelIdentifier.

Fixes:

  • Device.mac returns nil for a device that isn't a Mac without decoding the Mac data.
  • A Mac kind newer than Mac.Kind decodes as .unknown instead of leaving Mac.all empty.