RileyLinkDeviceManager.swift 372 B

1234567891011121314151617
  1. //
  2. // RileyLinkDeviceManager.swift
  3. // Loop
  4. //
  5. // Copyright © 2017 LoopKit Authors. All rights reserved.
  6. //
  7. import RileyLinkBLEKit
  8. extension RileyLinkDeviceProvider {
  9. public func firstConnectedDevice(_ completion: @escaping (_ device: RileyLinkDevice?) -> Void) {
  10. getDevices { (devices) in
  11. completion(devices.firstConnected)
  12. }
  13. }
  14. }