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.