1

In my watch app, I am using openParentApplication to communicate with the parent app however this is not always reliable especially if I have not used the parent app for a while. It seems that this is not waking up the parent app for communication. If I tap the parent app and launch it however, two way communication proceeds as normal and I get all my data. There are no crashes of any sort. The code is very sound.

Is this a known issue?

Lucas Huang
  • 3,998
  • 3
  • 20
  • 29
tgwaste
  • 439
  • 3
  • 7
  • Have you initiated a background task? See here: http://stackoverflow.com/questions/30137019/watchkit-return-reply-inside-a-block-in-handlewatchkitextensionrequest – John May 09 '15 at 21:30

1 Answers1

1

Make sure that you create a background task in handleWatchKitExtensionRequest. If you don't know how to do this, here is an example.

Community
  • 1
  • 1
John
  • 8,468
  • 5
  • 36
  • 61
  • Thanks for the replies everyone. I appreciate it. I was looking into the background task comments and I came across a problem with this call: [[UIApplication sharedApplication]. I have to allow the Watch Extension target for AppDelegate in order to enable the two-way communication however watch kit does not allow the usage of [[UIApplication sharedApplication]. So I'm not exactly sure how people are accomplishing this. – tgwaste May 11 '15 at 00:24
  • `[UIApplication sharedApplication]` is used in `handleWatchKitExtensionRequest`, which is a method in the app delegate of the parent application, not of the watch extension/app. – John May 11 '15 at 06:05
  • I have implemented this in my code and am testing. Many Thanks! – tgwaste May 11 '15 at 22:39