3

I have to send data from my watchkit to another watchkit. Is it possible ? If yes then what are the ways to achieve it ?

I knaw about how to send data to parent iPhone app and call method via [WKInterfaceController openParentApplication:dicData reply:^(NSDictionary *replyInfo, NSError *error) & handleWatchKitExtensionRequest

-Thanks in advance.

Aakil Ladhani
  • 984
  • 9
  • 32

6 Answers6

2

From a pure WatchKit perspective no, this isn't possible.

bgilham
  • 5,909
  • 1
  • 24
  • 39
1

Do you mean on the same device or different devices?

If different devices, you can use Core Bluetooth. If on the same device, you can use Darwin notifications, but there's no guarantee that any other WatchKit extension is active at the same time.

For the latter, use CFNotificationCenterAddObserver() and CFNotificationCenterPostNotification() with CFNotificationCenterGetDarwinNotifyCenter().

EricS
  • 9,650
  • 2
  • 38
  • 34
1

Security says no to watch to watch communications.

Try sending data to parent, have the parent send the data to the second parent of the second watch, which then send the data to the second watch.

watch1 -> parent1 -> parent2 -> watch2

Big kludge but the only way I see it can be done.

GLefavi
  • 44
  • 5
1

I think using App Group you can do this, otherwise there is no way

Sukeshj
  • 1,503
  • 1
  • 19
  • 25
1

No, it is not possible to communicate from two watches directly, as the real time paring is in the form watch app to iPhone only. You cannot use app groups to communicate between two watches. The only alternatives which can be implemented

  • Use core bluetooth for communication as mentioned in above answer

watch1 -> parent1 -> parent2 -> watch2

This method has a limitation, the iPhone screen needs to be turned on for all the time for communication.

  • Use a web service and refresh it at a specific time interval depending on your requirement from watch app only.
Rahul Mathur
  • 872
  • 1
  • 7
  • 20
0

Check out "Supporting Communication with Multiple Apple Watches" on https://developer.apple.com/reference/watchconnectivity/wcsession and then you need to setup app groups. You may not be able to send info to each other, but you can for sure store them in your Watch's App Group and then access that on the other Watches. And maybe using nsnotificationcenter or something similar you can tell the other watches to check for changes.

Grant Isom
  • 150
  • 11