中文位于文章的下半部分
Weekly Comment
According to a report by MacRumors, Apple engineers have been instructed to pause ongoing development of new versions and focus on fixing existing bugs and improving software performance. This pause is expected to last for one week.
We won't discuss whether one week is enough time to fix the numerous issues in the current system, frameworks, and development tools. But at least Apple is showing the intention and determination to address the bugs, something that many developers and users have been expecting for a long time.
I'm not a demanding developer or user, but I do have some small complaints about the many software issues Apple has had in recent years.
After the release of iOS 16 last year, I wrote a blog post, and here are some excerpts:
By 2022, SwiftUI had entered its fourth year. While previous updates of SwiftUI encountered some issues, none were as significant as those in its latest version. This trend of numerous bugs was not limited to SwiftUI but was also prevalent in iOS, macOS, and other Apple products.
This issue is not unique to Apple; it reflects a broader societal trend of relentless development. The pursuit of speed, change, and efficiency permeates all aspects of life, affecting both businesses and individuals.
Regardless of whether consumers have plans to purchase new products, the most prevalent voice on the internet whenever a new product is released is "incremental upgrades". This, in turn, affects the business strategy, as companies continuously introduce new models just to cater to the market, changing for the sake of change, and being different for the sake of being different.
However, consumers' seemingly endless desire for change is also fueled by corporate strategies. When companies fixate on annually releasing new versions of their products and shift from one-time purchases to subscription models, their primary goal often shifts to creating an impression rather than offering practical utility.
The use of over-the-air (OTA) updates, originally intended for certain specific fields, has been applied as a mindset in various areas such as management, design, manufacturing, and so on, which is shocking. Expecting no bugs or fewer bugs has become a luxury, and rapid iteration has become mainstream - fixing bugs during iterations, and creating bugs during iterations.
Do we really need to move so fast?
Previous Issue|Newsletter Archive
If you find this weekly newsletter or my blog helpful, I would greatly appreciate your consideration of making a donation through Patreon, or Buy Me a Coffee.
Originals
GeometryReader: Blessing or Curse?
GeometryReader has been present since the birth of SwiftUI, playing a crucial role in many scenarios. However, from the very beginning, some developers have held a negative attitude towards it, believing it should be avoided as much as possible. Especially after the recent updates of SwiftUI added some APIs that can replace GeometryReader, this view has further strengthened.
This article will dissect the “common problems” of GeometryReader to see if it is really so unbearable, and whether those performances criticized as “not meeting expectations” are actually due to problems with the developers’ “expectations” themselves.
Recent Selections
Maintaining Seamless Compatibility with Apple and LLVM Compiler Technology
In Apple's development environment, bitcode used to be an important component of apps submitted to the App Store. Apple servers could use bitcode to generate optimized binary files for different device architectures, such as Intel or ARM. However, as Apple's hardware devices have gradually unified into arm64, starting from Xcode 14, the App Store no longer accepts bitcode submitted from Xcode. This also means that the "optimized bitcode" originally used to reduce app size will no longer be effective since there are no longer different architectures, and the build target will be unique. This article delves into the evolution of Apple's compiler technology, with a particular focus on the decision to gradually phase out bitcode in the App Store and the role of LLVM in the Apple development ecosystem.
PEP 730 – Adding iOS as a supported platform
Russell Keith-Magee
Although iOS has a significant market share in the mobile device market, the official CPython currently does not support iOS. While iOS runs on a similar Darwin kernel as macOS, there are significant differences at the implementation level that require distinguishing between these two platforms. Recently, the Python community submitted a proposal suggesting iOS as one of the platforms supported by CPython. The goal is to achieve third-tier (Tier 3) support in Python version 3.13. The proposal emphasizes the importance of introducing iOS support in Python and discusses in detail the technology and project management challenges required to achieve this goal.
Your Life With (and Without) Observation
The Observation framework is one of the most important new features in Swift 5.9. In the recent Swift Connection 2023, Aviel Gross provided a comprehensive introduction to Observation. The content covers the history of Observation since its inception, the reasons for the need for a new framework, a comparison between Observable and ObservableObject, the advantages of Observable, new syntax and behavioral changes, how Observable works, and various considerations. Finally, recommendations and best practices for using Observable are given, emphasizing the importance of understanding how Observable works and its potential impact on SwiftUI views and application architecture.
22 Tips for New iOS Developers
Many developers who are new to iOS development often face various doubts and difficulties. For example, they may wonder how to choose a better learning path, how to avoid taking detours, and how to seek help when facing challenges. In response to these issues, Enid has provided 22 tips to help beginners quickly overcome the confusion of being a novice.
Swift Roadmap (includes explanations, examples, visual examples and resources)
This is a recently highly praised post on the Reddit forum. In the post, Antonel shared a meticulously crafted roadmap for learning Swift and SwiftUI, aiming to help those who want to learn iOS development. The roadmap is rich in content and summarizes a wealth of excellent resources available on the internet. It covers various aspects of knowledge, including the basics of Swift, creating and manipulating views in SwiftUI, state management, animation, gesture control, and more. It provides abundant examples, visual illustrations, funny jokes, and even includes breaks in between. This roadmap is suitable for Swift developers of all levels, from beginners to experienced developers, and everyone can benefit from it. You can check out the visual version of the roadmap here.
The Complete Guide to JSON Web Tokens (JWT) Authentication in iOS
JSON Web Token (JWT) is a compact, self-contained standard for securely transmitting information between two parties. It is widely used for authentication and information exchange in web applications. In this article, Mohammad Azam provides a detailed guide on how to use JWT for authentication in iOS applications. The article covers the methods for setting up JWT authentication on the server-side and seamlessly implementing this security measure on the client-side using SwiftUI. Additionally, the article discusses using ExpressJS as the primary framework on the server-side and mentions Vapor as an alternative solution for the Swift and iOS ecosystem. This article serves as a comprehensive guide for iOS developers on JWT authentication.
Fun Project
Let's xrOS
Since the WWDC 2023 event, many beautiful concept images and demonstration videos of visionOS apps have emerged on social media. However, due to the unofficial release of Apple Vision Pro, it is difficult for us to try out other developers' works.
To address this issue, XReality Zone has created the Let's xrOS application. With it, developers can try out visionOS apps created by other creators in the community.
You can also submit your own visionOS applications here to share with enthusiasts from around the world, without the need to submit the source code.
肘子的话
根据 MacRumors 的 报道,苹果的工程师被告知暂停正在进行的新版本开发工作,专注于修复当前存在的缺陷并提高软件性能。这次的暂停预计为一周。
我们不讨论一周的时间是否足够修复当前系统、框架和开发工具中存在的众多问题。但至少,苹果表现出了修复 Bug 的意图和决心,这是许多开发者和用户长期以来一直期望的。
我并不是一个苛刻开发者或用户,但是,对苹果近年来在软件方面存在的许多问题还是略些微词。
在去年发布 iOS 16 后,我写了一篇博文,下面摘录了部分内容:
到 2022 年,SwiftUI 已经迈入了第四个年头。尽管在之前的版本更新过程中,SwiftUI 也出现了或多或少的问题,但从来也没有像新版 SwiftUI 这么严重。Bug 众多的现象不仅仅表现在 SwiftUI 上,在 iOS、macOS 以及苹果很多其他的产品上都有所体现。
这绝非苹果独有的问题,整个社会目前都处在一种浮躁的发展轨迹中。求快、求变、求成效体现在方方面面,无论是企业还是个人。
不管消费者是否有购买新品的计划,每当新品诞生时,网络上充斥最多的声音就是“挤牙膏”。这反过来也会影响了企业的经营思路,为了迎合市场,企业会不断地推出新型号,为了变而变,为了不同而不同。
不过,消费者对变化的无限渴望也是由企业的各种措施导致的。当企业痴迷于为产品每年推出新的版本号,用订阅制取代买断制,让消费者在第一时间有感( 而不是有用 )成了首要目标。
OTA 这种本来用于某些特定领域的更新手段,被作为思想运用于经营、设计、制造等等领域,令人震惊。不出 Bug、少出 Bug 已变成奢望,高速迭代变成了主流 —— 在迭代中修复 Bug ,在迭代中创造 Bug。
我们真的需要走得这么快吗?
如果您发现这份周报或我的博客对您有所帮助,可以考虑通过 Patreon, Buy Me a Coffee, 微信 支持我的创作。
原创
GeometryReader :好东西还是坏东西?
GeometryReader 自 SwiftUI 诞生之初就存在,它在许多场景中扮演着重要的角色。然而,从一开始就有开发者对其持负面态度,认为应尽量避免使用。特别是在最近几次 SwiftUI 更新中新增了一些可以替代 GeometryReader 的 API 后,这种观点进一步加强。本文将对 GeometryReader 的“常见问题”进行剖析,看看它是否真的如此不堪,以及那些被批评为“不符预期”的表现,是否其实是因为开发者的“预期”本身存在问题。
近期推荐
Maintaining Seamless Compatibility with Apple and LLVM Compiler Technology
在苹果的开发环境中,bitcode(位码)曾经是提交到 App Store 的应用的一个重要组成部分。苹果服务器可以使用 bitcode 来为不同的设备架构(如 Intel 或 ARM )生成优化的二进制文件。随着苹果的硬件设备逐渐统一成 arm64,从 Xcode 14 开始,App Store 不再接受 Xcode 提交的位码。这也意味着最初用于减小应用大小的“优化位码”将不再有效,因为不再存在不同的架构,构建目标将是唯一的。本文深入探讨了苹果的编译器技术的演变,特别关注了在 App Store 中逐渐淘汰 bitcode 的决策以及 LLVM 在苹果开发生态系统中的作用。
PEP 730 – Adding iOS as a supported platform
Russell Keith-Magee
尽管 iOS 在移动设备市场占有相当份额,但 CPython 官方目前并不支持 iOS。虽然 iOS 运行在与 macOS 相似的 Darwin 内核上,但在实现层面需要区分这两个平台,因为它们之间存在显著的差异。不久前,Python 社区提交了一个提案,建议将 iOS 作为 CPython支持的平台之一。目标是在 Python 3.13 版本中实现第三级(Tier 3)支持。该提案强调了在 Python 中引入 iOS 支持的重要性,并详细探讨了实现这一目标所需的技术和项目管理挑战。
Your Life With (and Without) Observation
Observation 框架应该是 Swift 5.9 中最重要的几个新特性之一。在不久前的 Swift Connection 2023 上,Aviel Gross 对 Observation 进行了十分全面的介绍。内容涵盖了 Observation 从诞生开始以来的历史,为什么需要新框架、Observable 与 ObservableObject 之间的对比、Observable 的优点、新语法和行为变化、Observable 的工作原理、注意事项等众多内容。最后,给出了对 Observable 的建议和最佳实践,并强调了了解 Observable 工作原理的重要性,以及它对 SwiftUI 视图和应用架构的潜在影响。
22 Tips for New iOS Developers
许多初次接触 iOS 开发的开发者都会面临各种疑惑和困扰。例如,如何选择更好的学习路径、如何避免走弯路,以及在面对困难时如何寻求帮助等等问题。对此,Enid 提供了 22 条提示,旨在帮助初学者快速走出新手困惑期。
Swift Roadmap (includes explanations, examples, visual examples and resources)
这是一篇最近在 Reddit 论坛中备受好评的帖子。在帖子中,Antonel 分享了他精心创作整理的有关 Swift 和 SwiftUI 的学习路线图,旨在帮助那些想要学习 iOS 开发的人。路线图内容丰富,汇总了互联网上的大量优秀内容。包括了 Swift 的基本概念、SwiftUI 的视图创建和操作、状态管理、动画和手势控制等多个方面的知识,并提供了丰富的实例、视觉示例、有趣的笑话,甚至还包括了中间休息。这个路线图适合所有水平的 Swift 开发者,从初学者到有经验的开发者都能从中受益。你可以在此处查看路线图的 可视化版本。
The Complete Guide to JSON Web Tokens (JWT) Authentication in iOS
JSON Web Token(JWT)是一种紧凑、自包含的标准,用于安全地在两方之间传递信息,广泛应用于网络应用中的身份验证和信息交换。在这篇文章中,Mohammad Azam 详细介绍了如何在 iOS 应用程序中使用 JWT 进行认证。文章涵盖了在服务器端设置 JWT 认证的方法,并通过 SwiftUI 在客户端无缝实现了这一安全措施。此外,文章还讨论了使用 ExpressJS 作为服务器端主要框架的方式,并提到了 Vapor 作为 Swift 和 iOS 生态系统的替代方案。该文章为 iOS 开发者提供了关于 JWT 认证的全面指南。
视频
iOS 开发配饭吃:SwiftUI + TCA
TCA 已经推出一段时间了,被不少 SwiftUI 的开发者所推崇。但仍有不少开发者尚未接触过 TCA 或对其缺乏足够的了解。ethanhuang13 将通过视频带领大家体验 SwiftUI + TCA 的开发旅程。正如该视频系列的名称“开发配饭吃”所描述的那样,整个学习交流的过程将以轻松、惬意、较慢的节奏逐步展开。
项目推荐
Let's xrOS
自从 WWDC 2023 的发布会之后,社交媒体上涌现出了许多精美的 visionOS App 的效果图和演示视频。然而,由于 Apple Vision Pro 还未正式发布,我们很难试玩其他开发者的作品。
为了解决这个问题,XReality Zone 创建了 Let’s xrOS 这个 App。通过它,开发者可以试玩社区里其他创作者的 visionOS App。
你也可以 在此 提交自己开发的 visionOS 应用(无需提交源代码),与来自世界各地的尝鲜者们分享。