Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

81
Vistas
Swift Core Bluetooth - discoverServices - What happens if no service can be found?

I'm working with Core Bluetooth in Swift and I'm wondering what happens after I called discoverServices([myServiceUUIDs]) in case that no services that are matching can be found. The connect(_ peripheral: CBPeripheral, options: [String: Any]? = nil) has didConnect and didFailToConnect. So I have a case that gets called if it fails. But on discoverServices() the documentation says only

When the peripheral discovers one or more services, it calls the peripheral(_:didDiscoverServices:) method of its delegate object.

So in the "happy case" that it finds the services I can continue doing stuff. But how do I know that it can't find any services? Is there also a method for or do I have to use a Timer and just cancel after a defined time and assume that there is not the service I was looking for?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

It keeps looking until you turn it off. You have to use a timer or give the user a button to stop searching (or both.)

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda