波報 | Pofat 的 Swift 中文電子報

Share this post

波報 #36 - 表妹你為什麼不讀文件

pofat.substack.com

波報 #36 - 表妹你為什麼不讀文件

Swift 大小事 2023/2/27 - 2023/3/5

Pofat
Mar 6
Share this post

波報 #36 - 表妹你為什麼不讀文件

pofat.substack.com

💬 Pofat 的話

最近天黑的時間越來越晚,在外面都會玩到忘記時辰,幸好不是玩 Swift debugger,不然可能連本週週報都發不了惹。

《看前一期 | 所有文章》


🌎 On Swift Community

SwiftUI 文件更新

SwiftUI 團隊更新了所有資料流相關基礎物件的文件,尤其是如何以外部資料初始化 StateObject ,不過要注意的是因為 StateObject 只會呼叫初始化的 clousre 一次,如果從外部送值進去的話,當外部值變化時內部對應值不會發生變化(見下例)。



Swift 的 debug 之苦

Swift 這幾年功能增加得非常快,也有很大的擴展野心,像是 Swift Concurrency or Swift compiler in Swift,但是爛掉很久的 debugger 也因此更加地不堪使用,如果你也是不滿已久,不妨也一起發推抱怨和到 forum upvote。

Twitter avatar for @vatsal_manot
Vatsal @vatsal_manot
Swift debugging as of 2023 is fucked forums.swift.org/t/yo-apple-xco… I really can't think of a single iOS developer (that I know) who does not share this sentiment. Please upvote and amplify this forums thread. It'll probably be useless, but on the off chance that it isn't ¯\_(ツ)_/¯
forums.swift.orgYo Apple: Xcode debugging Swift is *STILL* horribly broken+1 Regardless of whether it is LLDB or Xcode - I’m genuinely baffled by how Apple has failed to fix debugging after years of having been broken. It begs the question - how do Apple engineers writing modern Swift debug their code when something so fundamental is broken? Print-based debugging?
7:37 AM ∙ Mar 1, 2023
113Likes16Retweets

App Store Review 甘苦談

作者送審 App 被拒,回復是「功能與一個最近由被終結的開發者帳號送審的 app 功能幾乎一樣」,在幾次上訴後都收到鬼打牆似的同樣回覆,絕望之下寫了這篇文並在 Twitter 發酵,顯然 Twitter 才是正式的申訴管道隔天就通過審核以及 Apple 的道歉來電,一天又平安地過去了。

最近另一個有名的莫名被拒案例還有 Mstodon 客戶端的 Ice Cubes。

Xcode 專業小技巧

開啟 debugger output filter ,這樣就只看得到 breakpoint 和 debugger 指令的輸出只是 debugger 時常壞掉。

Twitter avatar for @jesse_squires
jesse squires 🏴 @jesse_squires
Xcode Tip: filtering debugger output
jessesquires.comXcode Tip: filtering debugger outputWhen debugging a large project in Xcode that a large team works on, the console can get quite busy. Logs are everywhere! It can be difficult to sift through ...
7:57 PM ∙ Mar 2, 2023

🗣️ On Swift Forum

SE-0391: Package Registry Publish (Reviewing)

SE-0292 加入了 SPM registry service 的 server 端實作,framework 開發者在那註冊後,使用者便可以直接下載需要的 dependencies 而不再需要 clone 則個 git repo,類似 CocoaPods 的 Trunk。不過發佈的流程非常瑣碎且需全手動,要自己生成 metadata 、打包、簽名、認證再自己打 API 建立一個新 release, SE-0391 提議加入用來簽名的 swift package sign 和新指令 swift package-registry publish 一次完成上述的所有步驟。

同時也引入了對 package 簽名,讓使用端透過設定決定哪些 package 可以信任,不過 registry service 並沒有對 package 是否只由特定的一方發佈做驗證,所以使用上仍然不能假設簽名的 package 就是安全的。


🤪 Pofat 選推

很酷的 SwiftUI prototype

Twitter avatar for @jsngr
jordan singer @jsngr
i built a reflective ui 🪩
3:41 PM ∙ Mar 5, 2023
11,761Likes738Retweets

11 年前 Apple 內部對 review team 的怒吼,對比最近的莫名 reject 風波

Twitter avatar for @cpojer
Christoph Nakazawa @cpojer
The sentiment was there so why is App Store review still consistently failing 11 years later?
Twitter avatar for @TechEmails
Internal Tech Emails @TechEmails
Apple exec on App Store February 3, 2012 https://t.co/6FVyBGn0hI
2:55 AM ∙ Mar 3, 2023
25Likes1Retweet

Books 的翻頁動畫回來了,感人

Twitter avatar for @josealvarezn
José Alvarez @josealvarezn
Apple brings back the curl animation for pages in Books. 🤩 iOS 16.4 beta 2
Image
Image
9:24 PM ∙ Feb 28, 2023
2,001Likes110Retweets

這不就堂表妹

Twitter avatar for @Ezra_Black_
Ezra Black @Ezra_Black_
Why can’t you read documentation? The documentation:
developer.apple.comCNLabelContactRelationElderCousinMothersSiblingsDaughterOrFathersSistersDaughter | Apple Developer DocumentationThe label for the contact’s mother’s sibling’s daughter or father’s sister’s daughter.
5:20 AM ∙ Mar 1, 2023
116Likes16Retweets

這專案很簡單的,沒幾個檔案

Twitter avatar for @ios_memes
a meme page to check while Xcode is indexing files @ios_memes
“You'll see the project is pretty simple: almost everything is either in the AppDelegate or the Main Storyboard”
Image
12:33 PM ∙ Feb 27, 2023
183Likes14Retweets
Share this post

波報 #36 - 表妹你為什麼不讀文件

pofat.substack.com
Comments
TopNewCommunity

No posts

Ready for more?

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