13 報

Share this post

開發者週報 #157 我就住在動態島上

www.ethanhuang13.com

開發者週報 #157 我就住在動態島上

Apple/iOS 開發者的一週大小事 2022/09/12-2022/09/18

13
Sep 18, 2022
2
Share this post

開發者週報 #157 我就住在動態島上

www.ethanhuang13.com

13的話

台灣這週有好多地震… 希望大家都平安。

Twitter avatar for @ethanhuang13pro
13 Pro @ethanhuang13pro
台灣地震頻繁,這個「動態島」真不是開玩笑的。希望大家平安。
3:32 PM ∙ Sep 18, 2022

言歸正傳。因為想要觀察 Apple 的動態島,買了 iPhone 14 Pro Max。

分享一下截稿前觀察到的:

從動態島的運作方式,以及 Live Activity 的 API,很容易想像以後 Apple 推出眼鏡時,會怎麼樣提供類似的機制。

動態島一大特色是動畫,Apple 眼鏡的使用者介面如果有這種等級的流暢動畫,應該會是賣點之一。

眼鏡上要顯示第三方 app 的內容,很有可能繼續延伸 WidgetKit 這套機制。畢竟 WidgetKit 也是從 Apple Watch 的 ClockKit 演變來的。沿用同樣的更新機制,可以把耗電降低,包括與手機傳輸資料的需求。

當然這全然是我的猜測。非常希望 Apple 把 WidgetKit 的各種坑都處理好再來搞這套。

然後我要補充一件事情:如果沒有正在運作的 Live Activity 或是系統提供的狀態,則手機截圖上不會出現動態島。跟直接在模擬器按截圖鍵的效果不太一樣。

我想要累積到 100 位支持的讀者,目前的進度為 27%,請訂閱我的 Patreon!

(看前一期 · 回首頁)


🧪Apple Releases

這禮拜推出了 iOS 16 的 patch,與下一個 minor 的 Beta。

  • Xcode 14.0.1 RC (14A400) 修復無法跑在 iOS 15.7 裝置的問題

  • Xcode 14.1 Beta 1 (14B5024h)

  • iOS 16.0.1 (20A371) 直接發了正式版,沒有提供更新資訊

  • iOS 16.1 Beta 1 (20B5045d) 內含 ActivityKit

  • iPadOS 16 Beta 8 (20B5045d) build 同上,但版號跟 release notes 是分開的

  • watchOS 9.1 Beta 1 (20S5044e) 更新資訊沒有細節

  • tvOS 16.1 Beta 1 (20K5041d) 更新資訊沒有細節

  • macOS 13 Ventura 沒有更新 Beta 版

同場加映:

  • WeatherKit subscriptions now available

  • HIG 因應新硬體,調整了許多地方

Twitter avatar for @themikestern
Mike Stern @themikestern
And a handful of other HIG page updates to reflect new hardware and iOS 16 and iPadOS 16 functionality... 💥developer.apple.com/design/human-i… 💥developer.apple.com/design/human-i… 💥developer.apple.com/design/human-i… 💥developer.apple.com/design/human-i… 💥developer.apple.com/design/human-i… 💥developer.apple.com/design/human-i…
12:59 AM ∙ Sep 16, 2022
87Likes14Retweets

🐣Swift 5.7 Released!

雖說 Xcode 14 RC 時就可以用了,且 RC 跟正式版是同一個 build,但 Swift 5.7 的正式 release notes 還是跟著後者一起。

想看更多範例的話,還是推薦之前貼的 What’s New in Swift 5.7。

📓Apple Technotes

最近才發現這些官方提供的技術文章,強烈建議開發者掃過一遍!

Twitter avatar for @ethanhuang13
13 @ethanhuang13
PSA for iOS developers: Check Apple's Technotes. Lots of gems.💎 developer.apple.com/documentation/…
Image
6:31 PM ∙ Sep 12, 2022
10Likes4Retweets

🕳SwiftUI 天坑

長久以來我都把 .background 跟 .overlay 當成一樣的東西,只是在 Z 軸上相對位置不同而已。但是這...

Twitter avatar for @fatbobman
fatbobman (东坡肘子) @fatbobman
onPreferenceChange 失效的问题 长期以来,开发者习惯于在 background 中通过 preference 将位置信息通过 PreferenceKey 传递给父视图。 但此方法在新版的 SwiftUI 上会出现 onPreferenceChange 无法收到信息的情况。 此时将 background 改成 overlay 即可
1:39 AM ∙ Sep 14, 2022
33Likes4Retweets

List 就是我最常警告要避開使用的 SwiftUI 元件😂

Twitter avatar for @fatbobman
fatbobman (东坡肘子) @fatbobman
iOS 16 下 List 滚动崩溃‼️ 接到网友反馈,经过测试发现在 iOS 16 上,当 List 中的数据在发生变动后,使用 ScrollViewProxy 进行滚动,大概率会出现应用崩溃的情况 估计应该与 List 的显式标识调整有关 ScrollView + VStack( LazyVStack )不会出现崩溃现象 用下面的代码很容易就可以测试出来
Image
Image
Image
9:52 AM ∙ Sep 14, 2022
27Likes6Retweets

WidgetKit 裡本來 Text 放 date 會自動更新,壞了。

Twitter avatar for @liuyi0922
61 @liuyi0922
对 iOS 开发团队无语,Beta 7 出现的大 bug,到今天 16.1 Beta 都没修复,这问题影响了太多小组件了
developer.apple.comiOS 16.0 beta 7 broke Text(Date(),… | Apple Developer Forums
1:52 AM ∙ Sep 15, 2022
Twitter avatar for @Megabits_mzq
Megabits @Megabits_mzq
iOS 16.0 应该是把Text(_ date, style)和Text(_timeinterval)通通干坏了。。。要么动两下就停,要么压根不动。甚至位置还会跑偏???
Image
3:15 PM ∙ Sep 17, 2022

💡Xcode 14 小技巧

這招我學會之後,寫 SwiftUI 時超常用到!

Twitter avatar for @edwardsanchez
Ed Sánchez @edwardsanchez
In Xcode 14, if you select a block of text and type {, it embeds the block in a closure and puts the cursor in the beginning of the closure so you can define it. Works great for SwiftUI!.
9:52 PM ∙ Sep 14, 2022
974Likes144Retweets

💡iOS 16 小技巧

開機音效、鍵盤震動回饋,這兩個我都有用到。

Twitter avatar for @twostraws
Paul Hudson @twostraws
Three iOS settings I really love – give them a try! Boot chime on your new iPhone: Accessibility > Audio/Visual > Turn On & Off Sounds Haptic taps as you type: Sound & Haptics > Keyboard Feedback > Haptic See what Siri heard: Siri & Search > Siri Responses > Always Show Speech
11:13 AM ∙ Sep 16, 2022
182Likes25Retweets

不確定這招是 iOS 16 才有?總之手繪圖案結尾時放住不動,它會自動變成圖形。

Twitter avatar for @tomwarren
Tom Warren @tomwarren
Why didn’t anyone tell me about this iOS screenshot trick? theverge.com/2022/9/16/2335…
11:28 AM ∙ Sep 16, 2022
4,166Likes507Retweets

相簿內建刪除重複照片的功能了!而且可以批次處理。

Twitter avatar for @gregheo
Greg Heo @gregheo
Was that a duplicate search result? Those two photos above look pretty similar. New duplicates detection to the rescue, under the Utilities section of the Albums tab!
New Duplicates album in the Utilities section.
6:11 PM ∙ Sep 12, 2022
42Likes7Retweets

同場加映 iOS 16.1 Beta 的新增功能。

Twitter avatar for @appltrack
AppleTrack @appltrack
Apple released iOS 16.1 to developers...here's what's new ‼️ ⚡️ Clean energy charging ⏺ Live Activities support 🔋 Battery percentage on more iPhones 📸 Tweaked screenshot UI 💵 Ability to delete Wallet 🏠 Matter support for home accessories 🔒 Edit Lock/Home Screen easier
Image
Image
Image
8:23 PM ∙ Sep 14, 2022
2,047Likes270Retweets

🏝Dynamic Islands──Jordi Bruin

除了官方文件以外,可以抓這個 sample project 來試。

Twitter avatar for @jordibruin
Jordi Bruin @jordibruin
In similar fashion to the Swift Chart Examples repo I started after WWDC I’ve now also created a repo for… 🏝 Dynamic Islands Let’s start by recreating Apple’s examples and learning how it all works! I started with the phone app! github.com/jordibruin/Dyn…
10:31 PM ∙ Sep 14, 2022
119Likes15Retweets

請注意,只能在前景開始 Live Activity。

Twitter avatar for @bzamayo
Benjamin Mayo @bzamayo
Foreground only start seems like a pretty big gotcha for Live Activities use cases. E.G sports scores for your favourite team won’t be able to be pushed to you passively. You’ll need to launch an app at the start of every game.
Image
11:25 PM ∙ Sep 14, 2022
59Likes3Retweets

然後,使用者可以關閉個別 app 的 Live Actiivty。

Twitter avatar for @parrots
Curtis Herbert @parrots
The good thing (for users) is you can turn off live activities per app. I have a feeling sadly many apps might have this happen by not thinking about how their app fits into the user’s life. Live activities aren’t meant to be tiny widgets.
Image
10:34 PM ∙ Sep 15, 2022
18Likes2Retweets

📸iPhone 14 Pro Camera Preview: The Hardware Changes

Halide app 開發者對每代 iPhone 鏡頭的分析,已經變成每年這個時間點的慣例了。

Twitter avatar for @halidecamera
Halide @halidecamera
We had concerns that the iPhone 14 Pro’s 48 megapixels would come at the expense of ‘depth’; that its sensor wouldn’t render images as nicely or capture enough dynamic range. Here’s @sdw's RAW vs. an edit. This camera is incredible.
Image
6:49 PM ∙ Sep 17, 2022
4,147Likes508Retweets

以下是作者的個人推特帳號。

Twitter avatar for @sdw
Sebastiaan de With @sdw
I’d love to tell you that the iPhone 14 Pro is a fairly insignificant upgrade of the camera. Fine to wait a year. Snooze. But, uh... I am blown away by the new 48MP camera. It renders unlike anything I have ever shot on a phone before. It’s absolutely gorgeous. I am in heaven.
Image
6:35 PM ∙ Sep 17, 2022
9,013Likes505Retweets

🤪Random Tweets

Twitter avatar for @maxrudberg
Max Rudberg @maxrudberg
Lesser known Apple Watch Workouts: Migrate from Figma to Sketch (based on idea by @BasicAppleGuy)
Image
12:44 PM ∙ Sep 15, 2022
1,008Likes98Retweets
Twitter avatar for @BasicAppleGuy
Basic Apple Guy @BasicAppleGuy
iPhone 18 Pro 👀
Image
Twitter avatar for @ianzelbo
Ian Zelbo @ianzelbo
11 Pro —> 14 Pro 👀 https://t.co/BvqRJtB2NV
5:09 PM ∙ Sep 15, 2022
8,220Likes1,838Retweets
Twitter avatar for @joe_trash_talk
請鬼拿藥單 @joe_trash_talk
我:「您好」 ☎️:「我這裡是某某人力,有一個機會很適合您,方便聊聊嗎?」 我:「好呀」 ☎️:「下略五百字⋯⋯,有意願的話,請先給我您最新的履歷還有完成這份功課。」 我:「好呀」 打開郵件一看,嗯,是我當年出的考題,都沒改變呢。😌 #有點感動
4:25 AM ∙ Sep 16, 2022
243Likes2Retweets

美版 iPhone 14 已經沒有實體 SIM 卡槽,當然包裝盒內附的退卡針也就不用了。

Twitter avatar for @BasicAppleGuy
Basic Apple Guy @BasicAppleGuy
Goodnight Sweet Prince… 📎
Image
2:25 PM ∙ Sep 18, 2022
1,823Likes162Retweets

💼職缺/履歷交流區

如果你有 iOS 相關職缺或是求職履歷想要刊登在開發者週報,請見關於。


🙏支持 13 寫作,請訂閱我的 Patreon(我的目標是累積到 100 位支持者,目前進度 27%)、按喜歡❤️、留言💬、回信✉️與我交流。

Share this post

開發者週報 #157 我就住在動態島上

www.ethanhuang13.com
Comments
TopNewCommunity

No posts

Ready for more?

© 2023 ethanhuang13
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing