Practicar el uso de comunicación bidireccional mediante Watch Connectivity entre un iPhone 14 y un Apple Watch 9

Descargar el código «Implementing Two-Way Communication Using Watch Connectivity»

https://developer.apple.com/documentation/watchconnectivity/implementing_two-way_communication_using_watch_connectivity

Configurar el proyecto (Bundle Identifier correcto)

  • com.comunicacion
  • com.comunicacion.watchkitapp
  • com.comunicacion.watchkitapp.watchkitextension

Cambiar el valor en NSExtension y poner com.comunicacion.watchkitapp

Open the Info.plist file of the WatchKit Extension target and update the value of the NSExtension > NSExtensionAttributes > WKAppBundleIdentifier key with the new WatchKit app bundle identifier.

Cambiar el valor en WKCompanionAppBundleIdentifier (SimpleWatchConnectivity WatchKit App) y poner com.comunicacion

Resultado de el iPhone y el Apple Watch comunicándose

Posibles errores

Algo está incorrecto en WKAppBundleIdentifier (NSExtension -> NSExtensionAttributes)

The value of WKCompanionAppBundleIdentifier in your WatchKit app’s Info.plist «com.example.apple-samplecode.SimpleWatchConnectivity» does not match the bundle identifier of your companion app «com.comunicacion».

Algún nombre está incorrecto, revisar WKCompanionAppBundleIdentifier y bundle identifier

WatchKit App doesn’t contain any WatchKit Extensions whose WKAppBundleIdentifier matches «com.comunicacion.watchkitapp». Verify that the value of WKAppBundleIdentifier in your WatchKit Extension’s Info.plist matches the value of CFBundleIdentifier in your WatchKit App’s Info.plist.

Verificar la cuenta en el iPhone