Reputation: 5
If it is possible to call rest apis directly from Watchkit extension instead of using data sharing with companion app on Iphone.
My Query is instead of calling Rest apis from Iphone app and transferring required data to watchkit, can we call Rest api directly from Interface controller of watchkit extension and utilise the same to render the UI of watch.
Please share the solution.
Upvotes: 0
Views: 743
Reputation: 7383
its not possible with WatchOS1
. you have to get data from iPhone
only. But incase of WatchOS2
you can because directly WiFi
connectivity is there so you can connect and make request as well. Same as we have in iOS
use NSURLSession
Upvotes: 1