中文位于文章的下半部分
Weekly Comment
On November 22nd, the CEO turmoil at OpenAI finally came to an end with Sam Altman's return. Along with his return, the company's board of directors underwent restructuring.
In the past two weeks, I have been using ChatGPT intensively to help me create new projects (see the article in this issue of the blog for details). I'm not sure if it's related to the recent events, but the stability of ChatGPT has been quite unsatisfactory lately. I hope that with the re-stabilization of the company's management team, the quality of the service will also improve.
Despite the various news about the OpenAI incident flooding the timelines of social media last week, what actually caught my interest was a "party" initiated by designers and developers themselves: content interaction based on window position.
The "party" seems to have been triggered by this tweet. In the tweet, Bjørn Staal showcased a video demonstrating interaction between multiple browser window elements based on localStorage.
Soon, this idea inspired many designers and developers, who showcased their own implementations (@devdevcharlie, @nonfigurativ, @hakimel, @convey_it, @hungrydonke, @jw1dev), creating a spontaneous party.
If you are interested, feel free to join this "party".
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
Pair Programming with AI
Over the past two weeks, with the assistance of AI, I have embarked on rebuilding my blog in an unfamiliar development environment using languages and frameworks that are new to me. Through this rebuilding process, I hope to gain some mastery of these new languages and frameworks. This article records some of my experiences working with AI.
Recent Selections
Checking Out Assistive Access
Regardless of whether it is the era of feature phones or smartphones, in the Chinese mobile phone market, senior-friendly phones, as a specialized category, occupy a considerable market share. Typically, these phones are characterized by long battery life, large fonts, loud sound, and large buttons. Starting from iOS 17, Apple has provided a similar mode on the iPhone called Assistive Access. Assistive Access is a unique iOS experience that allows users with cognitive disabilities to independently use the iPhone more easily. In this article, Jordan Morgan expresses his views on this mode and provides some suggestions after using it. The article points out that some deliberate steps are required to enable this mode because it is not a feature that can be casually switched and is intended for long-term (or permanent) use. The article concludes by noting the lack of an API to determine whether Assistive Access is enabled, which the author sees as a regrettable limitation to the potential of Assistive Access. The author hopes that Apple can provide more support to third-party developers, as they are also willing to contribute to this mission.
How to customize the macOS menu bar in SwiftUI
In this article, Daniel Saidi introduces how to customize the menu bar of a macOS app in SwiftUI. In addition to explaining the basic usage of CommandMenu and CommandGroup, the author also explores some advanced topics, such as handling menu commands in multi-window apps and implementing custom focus values (FocusedValueKey). The author provides clear examples and screenshots for each step, allowing readers to follow along and apply these techniques in their own SwiftUI apps to create more distinctive macOS menu bars.
Using Swift SDKs to cross-compile Swift packages to Linux
Cross-platform compilation is a common requirement in development. In Swift 5.8 and earlier versions, developers needed to use "destination files" to achieve cross-platform compilation, which was a relatively cumbersome process. Fortunately, Apple's Swift team has greatly simplified this process by introducing Swift SDKs. In this article, Pol Piella Abadia provides a detailed explanation of how to retrieve, install, and use Swift SDKs using the Swift command-line tools. This article provides developers who wish to cross-compile Swift code on platforms such as Linux with detailed guidance and useful resources.
Swift JSON/Model Library Research
songgeb
This article is a summary of the author's research on Swift code libraries used for JSON and model conversion. The purpose of the article is to find an easy-to-use tool that addresses some of the usability issues of Swift's native Codable (which can solve the problem but often requires developers to manually write additional code). The article compares several different JSON libraries, including ObjectMapper, HandyJSON, KakaJSON, ExCodable, and CodableWrapper, and after considering the functionality, stability, integration cost, and minimum iOS version requirements, the author presents their own choice.
VisionOS: Debug Window
In the first quarter of next year, developers are expected to receive Apple Vision Pro. So, how can developers obtain debugging information when testing applications with the device? Yasuhito Nagatomo provides his solution in this tweet.
肘子的话
在 11 月 22 日,OpenAI 的 CEO 风波最终以 Sam Altman 的回归落下了帷幕。伴随着他的回归,该公司的董事会也进行了改组。
最近两周,我一直都在高强度地使用 ChatGPT 来帮助我创建新的项目(详情请见本期博客的文章)。不知道是否受本次事件的影响,ChatGPT 近期的稳定性相当不令人满意,希望随着公司管理团队的重新稳定,服务质量也能有所改善。
尽管在上周有关 OpenAI 事件的各种消息充斥着社交媒体的时间线,但真正让我感兴趣的反倒是一个由设计师和开发者自行发起的网络“派对”:基于窗口位置的内容互动。
“派对”似乎是由这条推文所引发的。在推文中,Bjørn Staal 展示了基于 localStorage 实现的多浏览器窗口元素之间的互动视频。
很快,这个创意启发了许多设计师和开发者,他们纷纷展示了自己的实现(@devdevcharlie、@nonfigurativ、@hakimel、@convey_it、@hungrydonke、@jw1dev),形成了一个自发的派对。
如果你也有兴趣,不妨也参与到这次的“派对”中去。
如果您发现这份周报或我的博客对您有所帮助,可以考虑通过 Patreon, Buy Me a Coffee, 微信 支持我的创作。
原创
与 AI 结对编程
在过去的两周时间里,在 AI 的辅助下,我在一个不熟悉的开发环境中使用陌生的语言和框架启动了博客的重建工作。通过这次重建过程,我希望能够对新的语言和框架有一定的掌握。本文记录了我与 AI 一起工作的一些体会。
近期推荐
Checking Out Assistive Access
无论是在功能手机还是智能手机时代,在中国的手机市场上,老年机作为一个专门的品类,都占据着相当大的市场份额。通常,这类手机的特点是超长待机、字体大、声音大、按键大。从 iOS 17 开始,苹果在 iPhone 上提供了一种类似的模式:辅助访问(Assistive Access)。辅助访问是一种独特的 iOS 体验,可以让有认知障碍的用户更轻松地独立使用 iPhone。在本文中,Jordan Morgan 表达了他在使用后对这种模式的看法和一些建议。文章指出,开启此模式所需的一些步骤是有意为之的,因为这不是一个随意切换的功能,而是长期(或永久)使用的功能。文章的最后指出,目前缺乏 API 来判断是否启用了 Assistive Access,这在作者看来是一个遗憾,因为这限制了 Assistive Access 的潜力。作者希望苹果能为第三方开发者提供更多支持,因为他们也愿意为这个使命贡献力量。
How to customize the macOS menu bar in SwiftUI
在本文中,Daniel Saidi 介绍了如何在 SwiftUI 中定制 macOS 应用的菜单栏。除了讲解了 CommandMenu、CommandGroup 的基本用法外,作者还探讨了一些高级主题,例如如何处理多窗口应用中的菜单命令和实现自定义焦点值(FocusedValueKey)。作者通过示例代码和截图清晰地展示了每个步骤,使读者能够跟随并应用这些技巧在自己的 SwiftUI 应用中,以实现更加有特色的 macOS 菜单栏。
Using Swift SDKs to cross-compile Swift packages to Linux
跨平台编译在开发中是十分常见的需求。在 Swift 5.8 及更早版本中,开发者需要使用“目标文件”(destination file)来实现跨平台编译代码,这个创建和分发过程相对繁琐。幸运的是,Apple 的 Swift 团队通过引入 Swift SDKs 大大简化了这个过程。在这篇文章中,Pol Piella Abadia 详细介绍了如何使用 Swift 命令行工具检索、安装和使用 Swift SDKs。本文为那些希望在 Linux 等平台上进行 Swift 代码交叉编译的开发者提供了详细的指导和有用的资源。
Swift JSON/Model 库调研
songgeb
本文是作者对用于 JSON 和 Model 互转的 Swift 代码库进行的调研总结。文章的目的是寻找一种易用的工具,解决 Swift 原生 Codable 存在的一些不易用的问题(Codable 能够解决,但通常需要开发者手动编写额外的代码)。文章对比了几个不同的 JSON 库,包括 ObjectMapper、HandyJSON、KakaJSON、ExCodable 和 CodableWrapper,并在综合考虑了功能、稳定性、接入成本和最低 iOS 版本要求后给出了自己的选择。
VisionOS: Debug Window
预计明年一季度,开发者将能够收到 Apple Vision Pro。那么,在佩戴设备调试应用程序时,开发者应该如何获取调试信息呢?Yasuhito Nagatomo 在这篇推文中提供了他的解决方案。
播客
完蛋!我被 OpenAI 新闻包围了!
美国时间 11 月 17 日,OpenAI 宣布解雇 CEO Sam Altman。自此以后,每天都会发生数次反转的剧情,堪比宫斗神剧。枫言枫语的两位主播 枫影 Justin Yan 和 自力hzlzh,将以播客的形式与广大听众一起观察这一事件的发展。
在本期播客即将发布之际,Sam Altman 又回到了 OpenAI 的 CEO 位置,这之后应该还会有持续的报道。
活动
🇸🇬 来自 iOS Conf SG 的邀请信
你好,中文圈的开发者!我们是 iOS 新加坡大会的筹办团队,在新加坡有许多说中文的华人,所以我们相信这是一个让中文开发者交流的好机会,希望能邀请更多中文圈的开发者一起参与 😊 。
大会亮点:
🔥 业界大佬 Paul Hudson 带来的最新数据保存框架「SwiftData」实战工作坊
🗣️ 10+ 位不同背景的资深开发者与设计师组成的演讲阵容
🤝 来自 30+ 个国家的开发者参与一同交流
活动详情:
日期:2024 年 1 月 18-19 日
地点:新加坡 SingPost Centre(巴耶利巴地铁站步行 2 分钟)
折扣码:
非常感谢肘子让我们在电子报推广,在肘子的 Discord 上也有专属频道,欢迎大家一起讨论和组团参加!(3 人以上有团报优惠价)
我们也特别提供各位专属的购票折扣码「FLY2SG」,希望能在大会上见到大家 💗。
了解更多并报名:https://iosconf.sg/
折扣码有效期间至 12 月 12 日中午 12 时