获取Apple Watch的服务器数据 [英] Getting server data for the Apple Watch

查看:144
本文介绍了获取Apple Watch的服务器数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何设计依赖于从服务器获取最新提要的watchOS应用程序.您是否需要使用应用程序上下文,而只是让iPhone使用WatchConnectivity框架在后台将其推送,还是在Apple Watch本身上使用NSURLSession?请记住,这是供watchOS 2使用的.

I am wondering how to go about designing a watchOS app that depends on getting the latest feed from a server. Would you need to use application context and just have the iPhone push it over in the background using the WatchConnectivity framework or would you use NSURLSession on the Apple Watch itself? Keep in mind this is for watchOS 2.

推荐答案

您可以使用NSURLSession来处理您的请求.因此,您的请求将在您的监视中是本地的.但请注意,您的手表在那里可以向用户显示简单的内容.

You can use NSURLSession to handle your request. So your request would be native on your watchn. But note that your watch is there to show simple Content to the user.

这篇关于获取Apple Watch的服务器数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆