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

查看:33
本文介绍了获取 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天全站免登陆