def device_and_model
      if os_name == :watchos
        # Sample string: Apple Watch Series 2 - 38mm
        name.split ' - '
      else
        # Sample string: "iPhone 5s" or "iPhone 6 Plus" or "iPad Air 2"
        if name.start_with? 'Apple TV'
          # The last part is the model, and the rest is the device
          parts = name.rpartition(' ').reject { |str| str.strip.empty? }
          [parts[0...-1].join(' '), parts.drop(parts.count - 1).join(' ')].map(&:strip)
        else
          # The first part is device, and the rest is the model
          name.split ' ', 2
        end
      end
    end
def device_and_model
      if os_name == :watchos
        # Sample string: Apple Watch Series 2 - 38mm
        name.split ' - '
      else
        # Sample string: "iPhone 5s" or "iPhone 6 Plus" or "iPad Air 2"
        if name.start_with? 'Apple TV'
          # The last part is the model, and the rest is the device
          parts = name.rpartition(' ').reject { |str| str.strip.empty? }
          [parts[0...-1].join(' '), parts.drop(parts.count - 1).join(' ')].map(&:strip)
        else
          # The first part is device, and the rest is the model
          name.split ' ', 2
        end
      end
    end
Returns the [device, model] for use during sorting
 Examples: [iPhone, 5s], [iPhone, 6s Plus], [Apple Watch Series 2, 38mm]