13 報

Share this post

開發者週報 #50 一歲了!

www.ethanhuang13.com

開發者週報 #50 一歲了!

Apple/iOS 開發者的一週大小事 2020/07/20-2020/07/26

13
Jul 26, 2020
2
Share this post

開發者週報 #50 一歲了!

www.ethanhuang13.com

13的話

開發者週報在這週滿一年了!0-49 共 50 期(扣掉春節與一次個人排休),感謝支持🙏如果你還沒有把週報推薦給其他開發者、同事或分享在 Twitter、FB 的話,是時候了!

順便說個小技巧,如果要閱讀或者分享特定的期數,可以用這個網址格式 https://ethanhuang13.substack.com/p/期數

(看前一期 · 回首頁)


 新聞稿連發

後兩則跟美國比較有關,所以沒有中文。

  • 7/21 Apple 承諾要在 2030 年對供應鏈和產品實現 100% 碳中和(應該就是台積電近期大幅投資綠能的主因)

  • 7/22 Apple、創意人員與身障人權運動人士的 ADA 30 週年回顧

  • 7/23 Future forward: The 40-year mission of an Apple Distinguished Educator

  • 7/24 Apple donates its proceeds from John Lewis documentary to museums that honor his legacy

🧪Beta 3

  • Xcode 12

    • 這版已同時支援 Intel 與 Apple Silicon

    • 多了一層 tabs(截圖)。我還沒搞懂為什麼要這樣設計,猜想是為了 SwiftUI 這種開發模式,常常需要切換 View 檔案但不想每個 tab 都要設定一次版面配置。這裡有篇文章教你怎麼關掉

    • XCFrameworks 現在支援把 dSYM 包進去了(這是我之前一直沒去用它的重要原因)

  • SwiftUI 增加了一些好東西

    • Menu 可以用在 iOS 14 了(範例)

    • beta 1 發表的 isPlaceHolder 現在叫做 redacted,效果超棒(範例)。目前某些字體會有問題

    • 現在有 Keyboard Safe Area,這樣鍵盤浮出時可以自動避開文字框

    • 這個 gist 有 beta 2 到 3 的 diff

  • Combine 的 assign(to:) 參數改成 inout 了

  • iOS & iPadOS 14

  • watchOS 7

  • tvOS 14

  • macOS Big Sur

    • 全新的 Virtualization framework 把虛擬化技術用到的功能抽成 high level API

    • macOS 10.15.6 可以認得 Big Sur 的 APFS 格式了

    • 補充,這裡有篇文章在說明 Big Sur 既是 10.16 也是 11.0

  • Safari 14 可以下載並安裝在 Catalina 或 Mojave

🖥Bring an iPad App to the Mac with Mac Catalyst

遲了一年的 Mac Catalyst 官方教學啊!如果你有 iPad app 想 port 到 Mac 上,就來學吧!預計 3.5 小時,需要 Xcode 12 跟 Big Sur。

同時還會學到一些新的 API。比如 iPad 上用的是 tab bar controller,在 Mac 上要怎麼轉換成 side bar,用的就是 UICollectionView 新的 list configuration。

🤖Apple Security Research Device Program

Apple 發表全新的安全研究方案,符合資格的研究人員可以租用特殊版本的 Apple 裝置。

🦠Apple 開源 Exposure Notification Framework

網頁下方可以取得原始碼。

💪SwiftUI 在 Xcode 12 效能較好

Twitter avatar for @waylybaye
Baye @waylybaye
我刚知道用 Xcode 12 beta 编译的 SwiftUI 的 App 会比 Xcode 11 编译的更流畅… 原来 SwiftUI 的性能不只和系统版本有关啊,和 Xcode 也有关系……
Image
3:18 AM ∙ Jul 22, 2020
18Likes1Retweet

這件事在今年的 session 就講了。不過這位 Apple 工程師的補充值得一看:

Twitter avatar for @jjgod
Jiang Jiang @jjgod
@waylybaye @lexrus SwiftUI性能在很多情况下依赖Swift的性能优化,换句话说SwiftUI在很多情况下已经没有很多余地优化了,多余的开销主要在Swift到Objective-C代码的bridging开销上,比如Swift多余的retain/release就是很大一笔开支,在手动内存管理的Objective-C代码里不存在这样开支,这些都是Swift编译器可以优化的。
4:19 AM ∙ Jul 22, 2020
19Likes6Retweets

🌌UICollectionView 宇宙

有人發現 UIContextMenu 在 iOS 14 用的是 UICollectionView,之前 iOS 13 它是嵌套的 UIStackView。

然後就有人說總有一天 iOS 會整個變成 UICollectionView😂

Twitter avatar for @flashspys
Felix Wehnert @flashspys
@Hejazi iOS 15: UICollectionViewMapLayout replaces MapKit iOS 16: UILabel will be rendered as horizontal UICollectionView iOS 17: UIImage is now a UICollectionView with 1 cell per pixel iOS 18: iOS will be renamed to CollectionViewOS
3:45 PM ∙ Jul 22, 2020
200Likes42Retweets

🗓DateFormatter 相對時間

SwiftUI Text 新增的 date style 很方便顯示相對時間,但你知道 NSDateFormatter 自從 iOS 4 以來就有類似的 API 嗎?請注意不支援自訂 format。

Twitter avatar for @simonnickel_dev
Simon Nickel @simonnickel_dev
TIL that DateFormatter has a property to show relative values like ‘Today’ 🤯 I almost started to implement it by myself ... again 🙈
Image
9:01 AM ∙ Jul 20, 2020
685Likes109Retweets

💡iOS Design and UX Tips

這串推文應該拿來當 iOS 面試題目。我大概會七成:

Twitter avatar for @JordanMorgan10
Jordan Morgan @JordanMorgan10
🎨 iOS Design and UX Tips 🎨 I’ll be extrapolating out things I’ve learned, read from the HIG and have seen that make an iOS app look and feel good. Tip 1) Make a table view row animate its selection state as it’s popping and pushing on the nav Stack.
Image
1:06 PM ∙ May 30, 2020
761Likes118Retweets

✍️同場加映面試考題

說是面試考題我是開玩笑的。不過身為 iOS 開發者,我想這些也該知道啦。

Twitter avatar for @hokilaJ
Hokila Jan @hokilaJ
終於遇到答得出來 certificate 跟 provision 是什麼的人了。 雖然還是不知道什麼是 AdHoc。
5:12 AM ∙ Jul 22, 2020
Twitter avatar for @saiday
教堂哥哥 @saiday
LLDB 的 po 會對 instance retain 嗎? 想不到 retain 的原因跟時機,但實測的確是會 retain 的。
8:35 AM ∙ Jul 23, 2020
19Likes4Retweets

🎆 Swift Array Capacity 變化之謎

兩個很有求知慾的人一問一答碰撞出的璀璨火花。面試不用考這個!

Twitter avatar for @hanyu_chen_ios
陳涵宇 @hanyu_chen_ios
無知發問。 Swift 的 Array 的 capacity 是怎麼變化的呀? 我以為是用2的次方在長大,但印出來看並不是。 1 2 4 8 16 32 94 190 382 766 1534 3070 6142 12286
Image
3:36 AM ∙ Jul 23, 2020

🔦LiDAR 掃描 App

有 iPad Pro 2020 的朋友可以去免費下載玩玩看。還可以產出 USDZ 方便做其他 AR 開發。

Twitter avatar for @laanlabs
Laan Labs @laanlabs
Made a simple LIDAR 3d scanner for iPad Pro. Couldn't find any apps that don't require cloud / signup / $ to get a mesh. You can share textured models in AR via iMessage + USDZ, GLTF, OBJ Quality isn't great, and it's slow.. but it's free. apps.apple.com/us/app/id14199…
Image
5:37 PM ∙ Jul 22, 2020
16,217Likes5,649Retweets

🚁重現 Big Sur 桌布

有趣的是他們雇用的直升機駕駛就是載 Apple 攝影團隊的同一位。

🤪Jokes

這週 Twitter 在流行「joke but」,我找了幾個跟 iOS 或軟體開發有關的:

Twitter avatar for @loyaltyarm
Nick Cobb @loyaltyarm
I have a CI joke but it only works on my machine
Twitter avatar for @awwstn
Austin Petersmith @awwstn
I have an HTTP joke but it’s 404ing https://t.co/CX7R8s634K
2:24 AM ∙ Jul 25, 2020
40Likes4Retweets
Twitter avatar for @numist
Scott Perry @numist
I wanted to make a database joke but I couldn't get it to fit the schema.
3:45 AM ∙ Jul 25, 2020
19Likes3Retweets
Twitter avatar for @siracusa
John Siracusa @siracusa
I know a UDP joke, but you might not get it.
Twitter avatar for @kjhealy
Kieran Healy @kjhealy
I have a social science joke, but you'll only laugh in ten years when an economist tells it. https://t.co/BhrtyJYvNz
3:56 AM ∙ Jul 25, 2020
843Likes114Retweets
Twitter avatar for @DaveWoodX
Dave Wood 🇨🇦 @DaveWoodX
I know an iOS dev joke, but I don't get 30% of it. #iosdev
Twitter avatar for @siracusa
John Siracusa @siracusa
I know a UDP joke, but you might not get it. https://t.co/Xv0PyDbpxZ
4:07 AM ∙ Jul 25, 2020
209Likes30Retweets
Twitter avatar for @simjp
JP Simard @simjp
I’d make an enumeration joke but I’m afraid many of you wouldn’t take it in stride.
5:26 PM ∙ Jul 25, 2020
Twitter avatar for @BalestraPatrick
Patrick Balestra @BalestraPatrick
I was going to make a Swift joke but the compiler is unable to type-check the expression in reasonable time.
5:38 PM ∙ Jul 25, 2020
123Likes13Retweets
Twitter avatar for @bzamayo
Benjamin Mayo @bzamayo
I had a butterfly keyboard joke but I just spilt my drink on it. Don’t worry, it’s all under Control.
5:39 PM ∙ Jul 25, 2020
162Likes8Retweets
Twitter avatar for @_inside
Guilherme Rambo @_inside
I had a podcasting joke, BUT FIRST, let’s thank our good friends at…
5:46 PM ∙ Jul 25, 2020
582Likes31Retweets
Twitter avatar for @jamesdempsey
James Dempsey @jamesdempsey
I have an unfinished projects joke.
5:58 PM ∙ Jul 25, 2020
Twitter avatar for @skovatch
Scott Kovatch @skovatch
I have a VIPER joke, but you’d need 7 other jokes to understand what it’s about. But it’s testable!
6:59 PM ∙ Jul 25, 2020
190Likes43Retweets

🎙weak self podcast 滿一年了

Twitter avatar for @weak_self
weak self podcast 👍 我就弱! @weak_self
💪弱弱的我活過第一年了! 🤝S1 初期收音慘不忍聽到各方高手來助麥 🤪S2 從頹廢到頹廢 🤯S3 回歸用 WWDC 浪費暑假的大主題 🙏感謝每位聽眾的支持,以後我們還是會繼續浪費各位的時間 💰如果你還沒有捐助過本節目也可以考慮一下weakself.dev/#donation
weakself.devweak self podcast三個在 iOS 開發圈打滾的台灣工程師,專為 Apple/iOS 開發者而製作的 Podcast。主講人一三、波肥、喬喬。
8:23 AM ∙ Jul 22, 2020
25Likes3Retweets

因為 weak self 跟週報是幾乎同時成立的嘛,就一起過生日🎂

第三季的重點都放在 WWDC20,別錯過了。已經釋出的集數:

  • 39: 第三季弱勢回歸!先來聊聊 WWDC20 印象

  • 40: Apple Silicon

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

  • 42: App Clips—應用程式切片是迷你 App 嗎?

  • 43: MetricKit—App 怎麼死的不用通靈啦

  • 44: 隱私流程改到你會怕

  • 45: iOS 14 主畫面帶來 App 存在感危機! 

  • 🆕 46: 推你入坑 SwiftUI 不後悔


以上就是本期的內容。歡迎轉寄或推薦給同事或開發者朋友。有問題或回饋請直接回覆即可。

Share this post

開發者週報 #50 一歲了!

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