Fatbobman's Swift Weekly #053
Breaking the Annual Release Cycle: A New Dawn for Tech Innovation?
Weekly Comment
Breaking the Annual Release Cycle: A New Dawn for Tech Innovation?
Remember when smart devices were durable goods and luxury items? Today, they've quietly taken on more characteristics of fast-moving consumer goods and decorative items. Somewhere along the line, annual updates and constant innovation became the norm for tech products. Big companies' annual release events have essentially become the tech world's fashion shows, captivating audiences worldwide.
This rhythm was initially led by industry giants, but as markets expanded and competition intensified, they found themselves trapped by this relentless cycle: knowing it's unsustainable, yet unable to stop.
Recently, Bloomberg reported that Apple might abandon its annual release strategy. If true, I believe this is a positive development. This step could alleviate many issues caused by years of rushed production and change for the sake of change, potentially bringing unexpected positive outcomes.
I'm well aware of the challenges this transition poses: Will consumers approve? Can shareholders accept it? Can management withstand the pressure? After all, in this era of self-media, release events are highly cost-effective promotional tools, and people have grown accustomed to being surrounded by new product information.
However, as number comparisons lose their appeal and superficial innovations fail to impress, consumers will ultimately return to the essentials: Does the product fit their needs and personal taste? What's the brand's reputation? Is their philosophy consistent? In emotional consumer decisions, quality experiences and reliable service will ultimately triumph over cold statistics.
I miss those surprise release events that left more to the imagination, the excitement of new product reveals following flawless secrecy, and the satisfaction of experiencing all new features right out of the box. I look forward to a future where release events once again elicit genuine applause, rather than polite clapping or fake cheers.
Previous Issue|Newsletter Archive
If you appreciate my work and want to promote your product to the Swift and iOS developer community, sponsoring my platform could be an excellent opportunity for you.
Your support through Patreon, or Buy Me a Coffee helps keep this newsletter and blog running. Thank you for finding this content helpful!
Originals
UserDefaults and Observation in SwiftUI: How to Achieve Precise Responsiveness
In SwiftUI, Apple’s @AppStorage
property wrapper greatly simplifies the process for developers to respond to and modify UserDefaults content within views. However, with the introduction of the Observation framework, new challenges have arisen—Apple has yet to provide a UserDefaults management solution for Observation. This article will explore how to efficiently and conveniently manage data in UserDefaults under the Observation framework and propose a complete and practical solution: @ObservableDefaults.
Recent Selections
SwiftUI Animations
Recently, Chris Eidhof gave a talk on SwiftUI animation techniques at the Swift Connection event in Paris. During this presentation, Chris demonstrated how to implement various types of animations in SwiftUI, ranging from basic animations to more complex ones such as phase animations, keyframe animations, and even particle animations. He provided several practical examples to help developers master these techniques. To enhance the efficiency of his presentation, Chris developed a "play back typing" tool that allowed him to showcase code smoothly during his talk. The video included in this post is a version Chris recorded and shared from home.
Using Binaries as Libraries
While many developers typically integrate open-source projects directly into their codebase, there are cases where calling executable binaries can be a more efficient approach. In this article, Alejandro Martinez demonstrates how to use Swift to call the ffmpeg
binary to render video, avoiding the need to link it as a source code dependency or a static/dynamic library. This approach not only simplifies the integration process but also eliminates the maintenance overhead that comes with external codebases, making it a good fit for certain specific tasks.
Why I Stopped Building for visionOS (And What Could Bring Me Back)
With the release of visionOS 2.0, the Apple Vision Pro has seen functional improvements, but it still hasn’t fully realized its potential as a spatial computing platform. Many developers, including Cihat Gündüz, have encountered limitations due to a lack of APIs, severely restricting innovation. In this article, Cihat shares his challenges while developing for visionOS, pointing out how the current lack of features is diminishing developer enthusiasm. He believes that if Apple provides more critical APIs, it will not only attract developers back to the platform but also offer users a more immersive and interactive experience.
Arrays VS Sets In Swift
In this article, Gabriel Theodoropoulos discusses the differences between arrays and sets in Swift programming, exploring their use in common operations. While arrays are the most frequently used collection type, sets offer distinct advantages, particularly in terms of performance and avoiding duplicate values.
What is dependency injection in Swift?
Dependency injection is a design pattern that involves providing dependencies from external sources rather than hardcoding them inside a class or struct. By using dependency injection, code becomes more modular, reusable, and testable, with each object focusing on a single responsibility. In this article, Donny Wals explores different methods for implementing dependency injection in Swift and discusses the pros and cons of each approach.
The Hidden Cost of AI-Generated Unit Tests: Sacrificing Domain Knowledge
As AI technology continues to advance, more developers are incorporating it into their workflows, with AI-generated unit tests becoming particularly common. While AI can greatly improve testing efficiency, it may also come with drawbacks. Mohammad Azam argues that manually writing domain-level unit tests helps developers deeply understand business rules, which is critical for building high-quality software. Over-reliance on AI-generated tests could diminish developers’ domain knowledge, potentially affecting the long-term quality of the software.
Event
Announcing the Swift Student Challenge 2025
The Swift Student Challenge 2025 will open for applications in February next year and will run for three weeks. All winners will receive one year of membership in the Apple Developer Program, along with a special gift from Apple and other benefits. You can learn more about the Swift Student Challenge here.
肘子的话
打破年度发布制度:科技创新的新起点
还记得智能设备曾是耐用品、奢侈品吗?如今,它们已悄然具备了更多快消品、装饰品的属性。不知从何时起,年度更新、标新立异成了科技产品的常态。大公司的年度发布会,俨然成了科技界的时装秀,万众瞩目。
这种节奏最初由巨头引领,但随着市场扩张、竞争加剧,他们反被这无法停歇的车轮所困:明知不可为而不得不为。
近日,彭博社报道 苹果可能摆脱年度发布策略。若属实,我认为是好事。这一步,或许能缓解多年来因赶工、为变而变带来的诸多问题,甚至带来意想不到的积极变化。
我深知这转变艰难:消费者会认可吗?股东能接受吗?管理层能否顶住压力?毕竟,在这自媒体时代,发布会是性价比极高的宣传利器,人们也习惯了被新品信息包围。
然而,当数据比拼失去光环、表面创新难以取悦,消费者终将回归本质:产品是否契合需求与个人品味?品牌的口碑如何?理念是否始终如一?感性的消费决策中,优质体验、可靠服务终将胜过冰冷数字。
我怀念那些给人更多想象的突发发布会,怀念因天衣无缝的保密带来的新品惊喜,更怀念产品到手便能体验全部新功能的满足。期待未来,发布会上再次响起发自内心的赞叹,而非礼貌性的掌声或虚假的欢呼。
如果您发现这份周报或我的博客对您有所帮助,可以考虑通过 爱发电,Buy Me a Coffee 支持我的创作。
原创
SwiftUI 中的 UserDefaults 与 Observation:如何实现精准响应
在 SwiftUI 中,苹果提供的 @AppStorage
属性包装器极大地简化了开发者在视图中响应和修改 UserDefaults 内容的过程。然而,随着 Observation 框架的引入,这一领域出现了新的挑战——苹果尚未为 Observation 提供相应的 UserDefaults 管理方案。本文将探讨如何在 Observation 框架下高效且便捷地管理 UserDefaults 中的数据,并提出一个完整而实用的解决方案:@ObservableDefaults。
近期推荐
演讲:SwiftUI 动画 (SwiftUI Animations)
近日,Chris Eidhof 在巴黎举行的 Swift Connection 活动上,进行了关于 SwiftUI 动画技术的演讲。Chris 通过这个演讲,展示了如何在 SwiftUI 中实现各种动画,从基础动画到更复杂的阶段动画、关键帧动画,甚至粒子动画,提供了多个实用的示例来帮助开发者掌握这些技巧。为了提高演讲的效率,Chris 开发了一个 “play back typing” 工具,允许他在演讲中更顺畅地展示代码操作。本文中附带的视频是他在家中录制并分享的版本。
将二进制文件用作库 (Using Binaries as Libraries)
尽管很多开发者通常会集成其他开源项目的代码,但在某些情况下,直接调用可执行文件也是一种高效的方式。在本文中,Alejandro Martinez 展示了如何通过 Swift 调用 ffmpeg
来渲染视频,而不依赖于将其作为源代码依赖或静态/动态库链接到项目中。这种方法不仅减少了集成的复杂性,还避免了引入外部代码库带来的维护成本,适合处理某些特定任务。
我为何停止为 visionOS 开发以及回归条件 Why I Stopped Building for visionOS (And What Could Bring Me Back)
随着 visionOS 2.0 的发布,Apple Vision Pro 的功能有所提升,但依然未能充分展现其作为空间计算平台的潜力。许多开发者,包括 Cihat Gündüz,在开发过程中遇到了 API 不足的问题,这极大地限制了创新能力。本文中,Cihat 分享了他在为 visionOS 开发应用时遇到的挑战,指出当前的功能缺失正在削弱开发者的积极性。他认为,如果苹果能够提供更多关键的 API,不仅会吸引开发者重新投入这个平台,还将为用户带来更具沉浸感和互动性的体验。
Swift 中的数组和集合 (Arrays VS Sets In Swift)
Gabriel Theodoropoulos 在文章中讨论了在 Swift 编程中数组(Array)和集合(Set)的区别,并深入介绍了它们在常见操作中的使用方式。虽然数组是最常用的集合类型,但集合也有其独特的优势,尤其是在性能和避免重复值方面。
什么是 Swift 中的依赖注入?(What is dependency injection in Swift?)
依赖注入是一种设计模式,通过外部提供依赖项,避免在类或结构体中直接硬编码依赖。使用依赖注入可以让代码更具模块化、可复用性和可测试性,使每个对象专注于单一职责,从而简化代码逻辑。在本文中,Donny Wals 介绍了在 Swift 中实现依赖注入的不同方式,并探讨了每种方式的优缺点。
AI 生成单元测试的隐性代价:牺牲领域知识 (The Hidden Cost of AI-Generated Unit Tests: Sacrificing Domain Knowledge)
随着 AI 技术的不断进步,越来越多的开发者将其融入工作流程中,其中利用 AI 生成单元测试尤为常见。虽然 AI 可以极大提高测试效率,但也可能带来一些隐患。Mohammad Azam 认为,手动编写领域级别的单元测试能够促使开发者深入理解业务规则,这是构建高质量软件的关键,而过度依赖 AI 生成的测试则可能削弱开发者对领域知识的掌握,影响软件的长期质量。
活动
2025 年 Swift 学生挑战赛公告 (Announcing the Swift Student Challenge 2025)
2025 年的挑战赛将于明年 2 月开放申请,持续三周。所有挑战赛获胜者将获得 Apple 开发者计划一年的免费会员资格、来自 Apple 的特别礼物等福利。可以 在此 了解更多有关学生挑战赛的信息。
AdventureX 2025 招募 Org Team 成员
AdventureX 于七月在杭州成功举办了中国首个由学生和社区组织的大型青年黑客松活动。他们刚刚发布了本次活动的 纪录片,生动展示了 AdventureX 2024 的激情与活力。
活动组委会已经进入了 AdventureX 2025 的筹备阶段,现正招募新成员,一同为这个充满创意的梦想贡献力量。
本次招募以下团队成员(需具备流利的英语沟通能力):
Design
Develop
Sponsorship
Logistic
PR/MKT
Nova(社会创新)
如果你是在校学生或自由职业者,欢迎 申请!
招募口号是:请不要寻找生命的意义,去创造吧,先生们,女士们!