为 Apple Watch 创建复杂功能
Creating Complications for Apple watch
我知道如何制作基本的手表复杂功能。
我想创造像原生电池一号(圆环)那样的复杂功能。
如何获取并发症的实时数据,可能是 API 调用,或者来自 iPhone 的数据?
我可以创建多个相同的并发症类型吗?
我想创造像原生电池一号(圆环)那样的复杂功能。
如何获取并发症的实时数据,可能是 API 调用,或来自 iPhone 的数据? -
Use WatchKit.framework to do this and use WCSession class to
perform the session talking between the phone and the watch.
You could also use the background tasks API introuduced in WatchOS 3
to make API calls in the background -
https://developer.apple.com/library/content/releasenotes/General/WhatsNewInwatchOS/Articles/watchOS3.html
To update complications in watch OS 3 - https://developer.apple.com/reference/watchkit/wkapplicationrefreshbackgroundtask
我可以创建多个相同的并发症类型吗?
No you cannot, one app can have only one type of complication.
我知道如何制作基本的手表复杂功能。
我想创造像原生电池一号(圆环)那样的复杂功能。
如何获取并发症的实时数据,可能是 API 调用,或者来自 iPhone 的数据?
我可以创建多个相同的并发症类型吗?
我想创造像原生电池一号(圆环)那样的复杂功能。
如何获取并发症的实时数据,可能是 API 调用,或来自 iPhone 的数据? -
Use WatchKit.framework to do this and use WCSession class to perform the session talking between the phone and the watch.
You could also use the background tasks API introuduced in WatchOS 3 to make API calls in the background - https://developer.apple.com/library/content/releasenotes/General/WhatsNewInwatchOS/Articles/watchOS3.html
To update complications in watch OS 3 - https://developer.apple.com/reference/watchkit/wkapplicationrefreshbackgroundtask
我可以创建多个相同的并发症类型吗?
No you cannot, one app can have only one type of complication.