user2296278 user2296278 - 8 months ago 44
iOS Question

watchkit , iOS sending data between watch and iphone

I want to create one button in watch and while tapping on watch start one process to my ios app. How can I send the data between 2 devices


[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(sayHello:) name: @"sayHelloNotification" object: nil];



[[NSNotificationCenter defaultCenter] postNotificationName: @"sayHelloNotification" object: nil];

in my button watch but it doesn't work

Answer Source

AFAIK, you can not share data directly, like send some datas between them.
What you can do is write data to same file.

See this blog post: