Weekly Comment
"Recommended for You" or "Recommended for Traffic"
"Why are these annoying articles or short videos always being recommended? How can I block them?" This is a question my father has been asking frequently lately. Even though I've taught him some technical methods (like choosing to reduce similar recommendations or blocking specific accounts), the reality is that once a user's "profile" is formed, it often takes a considerable amount of time to see any changes in the recommended content. This highlights a brutal truth: in the world of algorithmic recommendations, the weight of user choices is far less than imagined; the platform's pursuit of traffic is the fundamental driving force. Under this logic, even traffic generated by negative emotions is still traffic, and "haters" are also an important part of big data algorithms.
I first encountered the concept of "data mining" nearly thirty years ago. At that time, a friend of mine was working in IT management at Mars Foods, and he showed me how data mining was applied in enterprise settings. Every day, hundreds of employees manually recorded sales data of products in major supermarkets nationwide—including types, quantities, display positions, and other information. These valuable data were aggregated via fax and VPN, processed overnight, and ultimately formed decision-making reports. Back then, data analysis had clear and pure objectives.
Entering the internet era, data collection has become unprecedentedly convenient and unscrupulous. Every footprint a user leaves online is collected by algorithms and used for profiling. Internet companies cleverly package data mining as the concept of "big data," combining it with dazzling terms like AI and algorithms to paint a blueprint of "personalized" services. However, is this promise of personalized service truly centered on user needs?
While we criticize traditional media for their conservatism and subjectivity, shouldn't we also recognize their valuable aspects? Under the constraints of editorial systems and limited pages or channels, content selection at least maintains a basic respect for the moral sensibilities of the times. Now, with the advent of the short video era, algorithms have replaced editors, and the recommendation standards have shifted from being above average morality to merely avoiding legal punishment. Platforms no longer focus on the value orientation of content but display a naked pursuit of traffic.
The so-called "Recommended for You" is nothing more than a carefully designed commercial performance. Its core logic is to maximize platform profits through precise traffic algorithms, consciously or unconsciously constructing an information cocoon. "Recommendations for Traffic" is the underlying logic of "Recommended for You."
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
Using Transactions Instead of Save in SwiftData and Core Data
Ensuring data consistency and integrity is crucial in data persistence operations. The SwiftData framework introduces the transaction
method in ModelContext
, providing developers with a more elegant way to organize and manage data operations. This article explores how to use the concept of transactions in SwiftData and Core Data to build more reliable and efficient persistence operations.
Recent Selections
Deep Dive into Environment in SwiftUI
SwiftUI offers a powerful and efficient way to manage global state using @Environment
and related tools. In this article, Mohammad Azam provides an in-depth analysis of how to inject and access global state within view hierarchies, optimize state propagation to reduce performance overhead, and simplify complex view structures using these features. The article covers the transition from traditional ObservableObject
to the Observation framework and provides practical modular design tips to help developers avoid common pitfalls and build clearer, more testable SwiftUI app architectures.
Staged Spring & Static Friction
Spring animations, with their natural continuity and speed, create intuitive and lifelike interactions for users. However, bringing digital interactions closer to real-world physics requires careful fine-tuning of basic animations. In this article, Claudius Chuxuan Ma showcases several video clips and corresponding code to demonstrate the significant changes brought by these adjustments. From staged spring animations to simulating static friction, the author explores how tweaking animation parameters and physical properties can make interactions feel more authentic and natural.
Addressing Unexpected Terminations when launching from unlocked Camera Control
Weichao Deng (JuniperPhoton) discovered a system issue related to Camera Control and Capture Extension while using iOS 18 on iPhone 16 series devices. The termination mechanism intended for app extensions unexpectedly affected the main app, causing the app to be randomly terminated by the system. In this article, he provides a detailed explanation of the issue's reproduction steps, log analysis, and a temporary workaround. The author considers this a design flaw and urges other developers to report this issue through feedback channels to draw Apple's attention.
Time-Based View Updates in SwiftUI
SwiftUI's TimelineView
is a powerful tool for building views that update based on time, making it ideal for real-time clocks, countdown timers, and periodic data visualizations. Aryaman Sharda demonstrates how to use various scheduling modes, such as .periodic
, .explicit
, and .animation
, to achieve precise time-based updates. While TimelineView
meets many time-driven needs, Sharda highlights its limitations in event-driven scenarios and suggests considering Observation
or Combine
for real-time data streams and user interaction use cases.
Exploring Interactive Bottom Sheets in SwiftUI
Starting with iOS 16, SwiftUI introduced the presentationDetents
modifier, empowering developers to implement Bottom Sheets with ease. These sheets, widely used in system apps like Maps, Find My, and Stocks, provide flexible interaction experiences. In this article, Pasquale Vittoriosi delves into the core usage of presentationDetents
and its associated APIs, enabling developers to define custom sheet heights, drag behaviors, and interaction styles, creating functional yet context-aware custom sheet interfaces.
SwiftUI: Step 0 to Layout Protocol
The SwiftUI Layout Protocol provides a powerful interface that allows developers to create custom layout containers and precisely control the arrangement of subviews. By implementing the sizeThatFits
and placeSubviews
methods, developers can define the dimensions of the container and the positioning of its subviews. In this article, Itsuki demonstrates the fundamental usage and key features of the Layout Protocol by building a custom layout container that mimics the behavior of VStack
.
肘子的话
“为你推荐”还是“为了流量推荐”
“为什么总是推荐这些令人反感的文章或短视频?要如何才能屏蔽掉它们?”这是我父亲最近经常提起的问题。尽管我教给了他一些技术手段(如选择减少类似推荐、屏蔽特定账号),但现实是:一旦用户“画像”形成,想要改变这些推荐内容,往往需要相当长的时间才能见效。这凸显了一个残酷的真相:在算法推荐的世界里,用户的主动选择权重远低于想象,平台对流量的追逐才是根本驱动力。在这个逻辑下,即便是负面情绪带来的流量也是流量,“黑粉”也是“大数据”算法中的重要一环。
我最早是在接近三十年前接触到“数据挖掘”这个概念。当时,我的一位朋友在玛氏食品做 IT 管理工作,他向我展示了数据挖掘在企业中的应用场景。每天,数百名员工以人工方式记录全国各大超市中产品的销售数据——包括种类、数量、陈列位置等信息。这些珍贵的数据经由传真、VPN 汇总,经过整夜运算,最终形成决策报表。那时的数据分析,目标明确而纯粹。
步入互联网时代,数据采集变得前所未有的便捷而肆无忌惮。用户在网络上的每一个足迹,都会被算法收集并用于画像。互联网公司巧妙地将数据挖掘包装成“大数据”概念,结合 AI、算法等炫目词汇,描绘出一幅“专属定制”的服务蓝图。然而,这种个性化服务的承诺,是否真正以用户需求为中心?
在我们诟病传统媒体的守旧与主观性的同时,是否也应看到它们的可贵之处:在编辑制度与版面、频道数量的限制下,内容筛选至少还保留着对时代道德感的基本尊重。而今,随着短视频时代的来临,算法取代了编辑,推荐标准从道德底线滑向法律底线。平台不再关注内容的价值导向,而是展现出对流量的赤裸裸追逐。
所谓的“为你推荐”,不过是一场精心设计的商业表演。其核心逻辑,是通过精密的流量算法,最大化平台利益,并自觉或不自觉地构建了一个信息茧房。“为了流量推荐”才是“为你推荐”的底层逻辑。
如果您发现这份周报或我的博客对您有所帮助,可以考虑通过 爱发电,Buy Me a Coffee 支持我的创作。
原创
在 SwiftData 和 Core Data 中用 Transaction 代替 Save
在数据持久化操作中,确保数据的一致性和完整性至关重要。SwiftData 框架通过在 ModelContext
中引入 transaction
方法,为开发者提供了一种更优雅的方式来组织和管理数据操作。本文将探讨如何运用事务(Transaction)的概念在 SwiftData 和 Core Data 中构建更可靠、高效的持久化操作。
近期推荐
SwiftUI 环境的深度探索 (Deep Dive into Environment in SwiftUI)
SwiftUI 通过 @Environment
及相关工具提供了一种强大且高效的全局状态管理方式。在这篇文章中,Mohammad Azam 深入解析了如何在视图层级中注入和访问全局状态,优化状态传播以减少性能开销,并利用这些特性简化复杂的视图层次结构。文章不仅涵盖了从传统 ObservableObject
到 Observation 框架的转变,还提供了模块化设计的实用建议,帮助开发者避免常见陷阱,并构建出更清晰、更可测试的 SwiftUI 应用架构。
分段的弹簧动效 & 静摩擦力
弹簧动画以其自然的连续性和速度感,为用户创造了直观且栩栩如生的交互体验。但要让数字世界的交互更贴近现实物理,还需对基础动画进行巧妙调整。Claudius Chuxuan Ma 在文章中通过几个弹簧动画视频片段及对应代码,展示了这些微调所带来的显著变化。从分段弹簧动效的实现到静摩擦力的模拟,作者探索了如何通过调整动画参数和物理特性,让交互更加真实、自然。
🪜 Swift DocC:主题定制与分发技术 (Swift DocC: Theming and Distribution techniques)
Swift DocC 是一个强大的文档生成工具,能够帮助开发者创建结构化、高质量的项目文档。然而,若要构建精美且专业的文档,仍需要额外的定制工作。Weichao Deng 在本文中分享了如何通过定制 DocC 的外观与主题,使文档更加美观,以及如何高效地将生成的文档分发给团队或用户。对于开发者而言,掌握这些技巧不仅能让文档更具吸引力和专业性,还能显著提升团队协作和项目的用户体验。
SwiftUI 中的基于时间的视图更新 (Time-Based View Updates in SwiftUI)
SwiftUI 的 TimelineView
是一个构建基于时间更新视图的强大工具,适用于实时钟表、倒计时计时器和周期性数据可视化等场景。Aryaman Sharda 通过多个实用示例,详细展示了如何使用 TimelineView
的各种调度方式(如 .periodic
、.explicit
和 .animation
)来实现精准的时间控制。尽管 TimelineView
能满足许多时间驱动的需求,但 Sharda 指出其在事件驱动场景下的局限性,此时应优先考虑使用基于 Observation
或 Combine
的解决方案。
SwiftUI 中交互式底部弹窗 (Exploring Interactive Bottom Sheets in SwiftUI)
自 iOS 16 起,SwiftUI 通过 presentationDetents
修饰器,为开发者提供了强大的工具来实现 Bottom Sheet(底部弹窗)。这种弹窗形式广泛应用于系统应用(如 Map、Find My 和 Stocks),提供灵活的交互体验。在本文中,Pasquale Vittoriosi 深入解析了 presentationDetents
的核心用法及其配套 API,让开发者可以灵活定义弹窗高度、拖动行为和交互方式,创建既功能丰富又能保持背景交互的自定义弹窗界面。
🪜 从零开始学习 Layout Protocol (SwiftUI: Step 0 to Layout Protocol)
SwiftUI 的 Layout Protocol 提供了一个强大的接口,允许开发者自定义布局容器,精确控制子视图的排列方式。通过实现 sizeThatFits
和 placeSubviews
方法,开发者可以定义容器的尺寸和子视图的布局。Itsuki 通过构建一个模仿 VStack
的自定义布局容器,详细介绍了 Layout Protocol 的基本用法及其关键特性。