0

I am creating an app that shows bus schedules from my nearest bus stop. However if I am traveling between many busstops it seemes like the app stops to transfer data to my watch extension.

I think this is a issue because of the limited background time watch applications has. A better solution may be to check if the device is moving when the CLLocation manager launches the location delegate function, and if the device is not moving then update the complication because the user has moved to a new permanent location for a while.

Is there anyone that know if my assumption is correct? Or do someone else have a better idea?

JoakimSjo
  • 1,786
  • 1
  • 10
  • 16
  • According to the docs, you can only call transferCurrentComplicationUserInfo 50 times a day. More info here: https://developer.apple.com/documentation/clockkit/clkcomplicationdatasource – John Pollard Jan 12 '18 at 07:34
  • Should have added you can use the remainingComplicationUserInfoTransfers function to see how many transfers you have left - https://developer.apple.com/documentation/watchconnectivity/wcsession/1771700-remainingcomplicationuserinfotra – John Pollard Jan 12 '18 at 07:36
  • I also read that in the documentation. The problem, however, occurs when the phone tries to transfer complication data many times in the same hour. It looks like the watch application doesn't get background execution time after two transfers in the same hour. That also looks to be correct according to the documentation. Therefore my question was if someone had a better way to decide when to transfer data to the watch. https://developer.apple.com/documentation/watchkit/wkapplicationrefreshbackgroundtask – JoakimSjo Jan 12 '18 at 17:35
  • Why do you need to transfer data from your phone in the first place? You can handle network requests directly from watchOS since watchOS2, so you should be able to make the network requests directly from the watch. – Dávid Pásztor Jan 12 '18 at 18:31
  • Yeah, I know. But you can't request background location updates in watchOS unless you are a health app and a workout session is started? – JoakimSjo Jan 13 '18 at 15:27

0 Answers0