ios - watchconnectivity not working on device - only simulator -


i have followed many tutorials online , seen how connect watch iphone able send data , have following code to:

send:

watchsession.sendmessage(["name":"maz"], replyhandler: nil) { (error) -> void in      } 

receive:

func session(session: wcsession, didreceivemessage message: [string : anyobject]) {     mylabel.settext(message["name"]! as? string)     //reloadwatchtable() } 

the code works when use simulator not when i'm running on iphone , apple watch.


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -