0

I have a method in my main interface controller class that I wish to run when the WCSession between the phone and watch has finished activating. I know there is a didFinishActivation function in the WCSession class. However, how do I communicate the result of this function to my main interface controller class to run the function in there, after WCSession has finished activating?

4

1 回答 1

1

You have to make your interface controller class conform to the WCSessionDelegate protocol and then the session(_:activationDidCompleteWith:error:) function will be automatically called once the WCSession is activated.

于 2017-07-17T10:26:21.490 回答