So, complications and WatchOS 2. I've never really managed to crack these.
I'm trying to achieve something fairly simple and build it up from there. I'm using objective C so and help would be preferable on that but could work it out from swift if I had to. For now let's just say my complication data is just something really simple like the time, except the data must come from the iPhone. I'd like my complication to update every 30 mins.
Ideally I would call transferCurrentComplicationUserInfo
From the iPhone however I do not believe is is possible to schedule the iPhone to wake every 30 mins in the background to do this so that rules that out.
So for scheduled updates it has to start with the ComplicationController and GetNextRequestedUpdateDate
I can set this to time interval 3600 seconds (30 mins) and jobs a gooden in 30 mins it wakes and calls RequestedUpdateDidBegin
So, how do I then get the time data from my iPhone?
Let's assume it's nearby and I've got plenty of 'budget' for updating the complication.
I thought I could use OpenParentApplication
But that will apparently only work when called from inside the interfaceController class, that would involve the user having to open the complication to update the app so scrap that.
Next is using WatchConnectivity and using either the updateApplicationContext or sendMessage options. I'm not sure exactly how to get these calls to wake the app from background however and the didRecieveMessage or didRecieveApplicationContext never gets called in the ComplicationController so I have to assume I've got something wrong. Because I only call the CLkServer complication update etc.. then, the complication never updates.
I'm fairly sure what I'm trying to achieve is possible, waking the iPhone app when the complication need an update and then obtaining really basic data from the iPhone. I'm just not sure how to implement it.
Any help would be amazing, thanks!