41: Widgets are not mini apps, widgets are not mini apps, widgets are not mini apps

全新的 Widget 跟你想像的不一樣!使用者要聽、iOS 工程師要聽,設計師跟 PM 更要聽!

留言

{ 完整節目筆記 https://weakself.dev/episodes/41 }

  • 更新的限制:更新原理跟 ClockKit 一樣,也就是 Apple Watch 錶面的複雜功能(Complications)。即使你設定為每次讀到最後一筆資料就啟動更新,或是狂發 push,系統還是會限制更新頻率
Is there any reload rate limitation exits in WidgetKit?
Yes. For example, if you return one entry with timelineReloadPolicy.after, and you make the “after” date like 1 minute from now, 60 times in one hour, you will run out of reloads. ”You don’t wanna do anything crazy.” - @roczhang9673
  • 畫面的限制:2x2、4x2、4x4 三種尺寸(相對於 app icons)
  • 操作的限制:只能單點打開 app,不能滑動。2x2 還不能區分不同區塊要打開不同連結
  • 效能上的優勢:利用 SwiftUI 的特性讓畫面可以在顯示的瞬間讀取並建構完成,而不像以前每個 widget 都要做大量即時運算

參考資料

更多 weak self

Om Podcasten

在 iOS 開發圈打滾的台灣工程師,專為 Apple & iOS 開發者而製作的中文 Podcast。內容涵蓋 Apple 開發圈的新知討論、踩坑經驗、人物採訪、社群活動、職場生活。更多資訊請見官網 https://weakself.dev 或是 Twitter @weak_self