And what if the website hosting application turned into no longer running in any respect on the host device? That is a totally probable scenario if users had been to play around with their apple watch even as their iphone become asleep of their pocket. These troubles offered severe challenges to supplying a seamless consumer experience. Formerly-to be had solutions blanketed:
• duplicating functionalities out of your ios app into your watchkit extension
• growing a framework for each goals to apply (apple’s encouraged answer)
• creating your own shape of messaging among the watchkit extension and hosting ios software, which many developers have attempted
with the release of xcode 6. 2 beta 2, apple brought a way that could allow a watchkit extension to speak from side to side with its host app. The brand new technique, -openparentapplication:respond:, lets in the watchkit app to wake its discern app and ship it an nsdictionary. The host app handles this request by using enforcing a new approach inside the app delegate, -utility:handlewatchkitextensionrequest:respond:.
Right here, you have got the option of sending a response nsdictionary lower back to the watchkit extension. This request-respond mechanism solves the issues we discussed in advance through allowing for easy communique between the watchkit extension and the hosting software. The use of -openparentapplication:respond:
permit’s test a simple instance of the electricity and benefits of those new strategies. Here, we have an apple watch app that allows the consumer to pick certainly one of 3 phrases which rhyme with “at”: cat, hat and my coworker, mat.
The selected word will seem as an picture in a wkinterfaceimage (the watchkit equivalent of a uiimageview). You may download this pattern challenge right here.
'port' isn't a grimy word: shifting your ios apps to android
for a clothier, the word “port” may be draw back-inducing. By way of definition, a port is an application adapted from one environment to another. However, what feels like a quick re-skinning challenge is virtually a difficult procedure involving design, development and stakeholder conversation.