WatchKit
外观
WatchKit 是苹果公司为Apple Watch应用开发提供的软件框架,基于Swift和Objective-C语言,需通过Xcode编译实现,其架构设计与iOS应用开发类似。[1]
历史
[编辑]2014年随iOS 8.2测试版发布[2],早于Apple Watch正式上市一年。2015年苹果在多个城市设立保密实验室,开发者需在遮蔽手机摄像头的环境中进行应用测试。[3]
技术特性
[编辑]基础架构
[编辑]开发限制
[编辑]初期版本要求应用主体在iPhone运行,2015年watchOS 2.0开始支持原生应用开发[5]
核心组件
[编辑]功能类
[编辑]- WKInterfaceController
- WKUserNotificationInterfaceController
- WKExtension
- WKAlertAction
UI元素类
[编辑]- WKInterfaceButton
- WKInterfaceMap
- WKInterfaceTable
- WKInterfaceSlider
多媒体类
[编辑]- WKAudioFilePlayer
- WKInterfaceMovie
- WKImageAnimatable
开发工具
[编辑]需配合Xcode 6.2+版本使用,提供:
- 界面构建器(Storyboard支持)
- 手表模拟器
- 性能分析工具
影响与演进
[编辑]2016年被WatchOS SDK逐步取代,但其设计理念影响了后续SwiftUI对穿戴设备的支持方案。
参考
[编辑]- ^ Soheil Azarpour. WatchKit FAQ. kodeco.com. 2015-02-24 [2024-02-13].
- ^ Andrew Cunningham. Apple releases WatchKit developer tools alongside first iOS 8.2 beta. Ars Technica. 2014-11-18 [2024-02-13].
- ^ Tom Warren. Apple's taping over developer iPhone cameras in secret watch labs. The Verge. 2015-03-11 [2024-02-13].
- ^ Benjamin Mayo. Apple WatchKit third-party apps require a connected iPhone to function. 9to5Mac. 2014-11-18 [2024-02-13].
- ^ Christina Bonnington. With New Dev Kit, Apple Gives Us a Glimpse of How Its Watch Will Work. Wired. 2014-11-18 [2024-02-13]. ISSN 1059-1028.