0

I am using WCSession to pass data between my iWatch and iPhone app. I need a way to see if the phone has already sent data when the watch opens up.

I have tried didReceiveApplicationContext, didReceiveUserInfo and didReceiveMessage but they only get called if there is data. Is a timer the only way to go?

WCSession *session;
  if ([WCSession isSupported]) {
    session = [WCSession defaultSession];
    session.delegate = self;
    [session activateSession];
 }
Hamish
  • 78,605
  • 19
  • 187
  • 280
user1079052
  • 3,803
  • 4
  • 30
  • 55
  • Just to make sure I understand; when activateSession returns you want to be able to know whether you are about to get some callbacks with new data from the phone? – ccjensen Jan 14 '16 at 07:35
  • This case is that the user goes on the watch app before the phone.I need to check on the watch if there is data saved in an activeSession. If there is then the delegates fire but if there is no data then the only way I can tell is if the delegates don't fire I don't want to use a time to see if the delegates fire by the end of the countdown. . – user1079052 Jan 14 '16 at 11:21
  • Thanks for confirming. You should file an enhancement request with Apple as this sounds useful! – ccjensen Jan 15 '16 at 15:43

1 Answers1

0

What I ended up doing was sending dummy data when I open the watch app and checking the didFinishUserInfoTransfer.

user1079052
  • 3,803
  • 4
  • 30
  • 55