0

I've got a function, named didReceiveApplicationContext and I need to transfer several dictionaries there. Now, I'm using this code:

guard let transferData = applicationContext["dataFromAnotherDevice"] as? Int else { return }

When I'm trying to do the same action ( to repeat this code ), I don't receive anything.

1 Answers1

0

The applicationContext API only sends delivers the most recently passed in dictionary. It sounds like you want to use transferUserInfo instead which queues up each dictionary.

ccjensen
  • 4,578
  • 2
  • 23
  • 25
  • Thanks you! But, I think you didn't understood me correctly. For example , I've got several buttons on my ViewController (iPhone) and I need to send different kind of data from different buttons to Apple Watch. So, what the way to receive it? – Егор Кузнецов Jan 25 '16 at 06:51