Original link: https://github.com/SwiftOldDriver/iOS-Weekly/releases/tag/%23243
The old driver’s iOS weekly report only presents valuable information for you.
You can also contribute to this project. If you find valuable information, articles, tools, etc., you can submit them to us in Issues , and we will deal with them as soon as possible. Remember to write down the reason for the recommendation. Suggestions and comments are also welcome to Issues .
news
Foundation Package Preview Released
@kemchenj : Last year’s weekly report mentioned that Foundation would be re-implemented in Swift . Recently, the Swift development team released a preview version. Compared with the current version of Foundation, the performance of date-related functions has improved by 20%-150%, and the performance of JSONDecoder/JSONEncoder has even reached 200%-500%.
In the first half of 2023, we will continue to focus on the implementation of the core API and the completion of tests. In the second half of the year, we will focus on importing existing Foundation APIs, such as URL/Bundle, etc., and also allow a small number of new ones to be added through proposals during the process. APIs.
In a word, Swift is the new Foundation.
article
Xinyu iOS Session Page Performance Optimization—ReactiveObjC Practice
@那尔先森: ReactiveObjC
is a responsive programming framework under Objective-C
, which can convert various notifications, agents, etc. into event streams for distribution. There are RxSwift
and Combine
under Swift
. This article introduces how the “Xinyu” team uses ReactiveObjC
to solve the problem of logical dispersion in the project.
Tips: Developers are advised to evaluate the learning curve and maintenance and debugging issues before getting started with the
RAC
library.
Notifications: why less is more — how Facebook has been increasing both user satisfaction and app usage by sending only a few notifications :
@吃笑饮食粉: A member of Facebook’s Notification Data Science team conducted a survey on how users feel about notifications. Final Conclusion I believe other data science teams outside of Facebook can also benefit from this. They found that users use Facebook more in less notification experiences, that it takes a long time for user behavior to shift, and that fewer interruptions lead to higher organic usage, resulting in higher user satisfaction and app usage Rate. It is important to note that long-term experiments may show different or even opposite results than short-term experiments because people need time to adapt to the changes.
The ten-year “shit mountain” was finally refactored, but QQ chose Electron, which was abandoned by Microsoft Teams :
@Damien : This article is not a technical article. It mainly introduces QQ’s new NT technology architecture. QQ realizes the unification of QQ multi-platform architecture by virtue of NT architecture. One of the key points of QQ NT technology is to use Electron as the cross-platform solution for the new version of QQ desktop UI. plan. Interestingly, at the same time, Microsoft Teams is giving up Electron, and students who are interested in cross-platform development may wish to read it.
MainActor usage in Swift explained to dispatch to the main thread
@J_Knight_ : This article introduces the concept and usage of MainActor. First introduced its concept: it is a new attribute introduced in Swift 5.5, it provides an executor that performs tasks on the main thread, using @MainActor
attribute will help you ensure that your UI is always updated on the main thread. MainActor is a globally unique Actor that executes its tasks on the main thread. It should be used on properties, methods, instances and closures to perform tasks on the main thread. Then it introduces how to use it in different scenarios with code examples.
Open Source Image Model Stable Diffusion Primer
@老狼: In addition to large language models like ChatGPT, image models like Stable Diffusion have also received widespread attention recently. And because the image model is relatively easy to run on your own machine, many students are eager to try it and want to deploy it on their own machine to experience the effect. This article from Tencent Technology is a very good introductory article for beginners. It will take you step by step to deploy the image model from scratch. Interested students can come and learn.
The evolution of veImageX: iOS high-performance image loading SDK
@Smallfly : This article mainly introduces veImageX iOS client image loading SDK, its core functions include:
- Network loading: supports native network library and self-developed network library by default, not only does some network-related optimization, but also supports the latest network protocol QUIC, and also provides fine-grained network monitoring;
- Image decoding: support Apple’s native image format, and other mainstream image format decoding in the community, the whole system supports HEIF format;
- Image processing and transformation: After the image is loaded, in addition to decorating the image, it also supports super resolution to achieve low-resolution transmission and high-resolution display;
- Log reporting: including image performance logs, user perception logs, and large-image monitoring logs. With the workbench, various indicators of images can be monitored in an all-round way.
In addition to the basic functional modules, the SDK has also carried out a series of performance and experience optimizations to improve the image loading experience, gracefully control memory, and optimize animation playback. Currently, the SDK provides fee-based services in an open platform.
The “pit” brought by the Clang Module of Kuaishou Swift Adventures
@老峰: This article mainly introduces the problems encountered after Kuaishou accesses Swift and starts the Clang Module, such as compilation errors, slow Module compilation, failure of PCH compilation optimization, low reuse rate of Module & expired compilation failures, etc., and the corresponding solutions Solution Clang closes the Clang Module, the principle is very simple, mainly to break some experience “misunderstandings” in the process of accessing Swift.
Debug iOS app in Visual Studio Code
@JonyFang : This article mainly introduces the process of debugging iOS app in VSCode. Main content structure:
- Use the LLDB remote debugging program to briefly describe the general principle.
- VSCode debugs ios app code. Introduction and configuration of necessary plug-in capabilities.
- Debug XCTest. Introduced the related configuration and principle of vsc.
- Debug XCTest with host app. Call XCTestCore and other private Framework symbols directly through reflection or dlsym, create XCTestDriver and then call XCTestCase.
Through this article, you can understand how VSCode customizes tasks and launch configurations. Following the practice, you can also gain a deep understanding of the principle of the lldb debugger.
Yielding accessors in Swift
@zoeGuo : Multitasking collaboration is often encountered in development. When copy-on-write types and dynamic properties are encountered in multitasking processing, the collaborative generator can play a big role. In Swift, the co-generator _modify and _read methods cooperate with the yield keyword to show significant performance advantages when multi-tasking works together, including data processing speed and memory usage. The article verifies the performance improvement after using the co-generator in detail, but the _modify and _read methods still have the _ flag, which means that they are still in the work-in-progress stage, and the yield keyword is currently only available in nightly Used in toolchains, look forward to seeing updates in the new version of Swift as soon as possible.
Linker Optimization: Same Code Folding ICF
@AidenRao : ICF is an optimization technique of the linker, which merges and links C++ methods with the same implementation to the same address during the linking phase. Since C++ templates will generate a large number of methods with the same implementation, this technique has a good installation package optimization effect in C++ code.
Related reading links:
- Safe ICF: Pointer Safe and Unwinding aware Identical Code Folding in the Gold Linker
- LLD for Mach-O: The Journey
tool
ETTrace
@Leo : ETTrace is an open source tool for time-consuming code analysis by emergeTools. The implementation principle is to start a sub-thread in the App to obtain the function stack of the main thread at regular intervals, and then generate JSON from these stacks and upload them to the website as a flame graph for developers to analyze. Logically, this method is more accurate than Instrument, because starting from iOS16, dyld4 will pre-calculate protocol conformances to optimize the startup time, but the implementation of Instrument is to use DYLD_INSERT_LIBRARIES, which causes this optimization to be disabled.
the code
Compose Multiplatform
@极速男孩: Compose Multiplatform is a cross-platform UI development framework based on Kotlin Multiplatform, designed to simplify and unify user interface development for Android, iOS, desktop and web applications. Its core concept is derived from Jetpack Compose, a modern Android UI toolkit from Google that supports declarative UI code written in Kotlin. iOS support was ushered in in the recent Alpha release.
Moyu Weekly
@探鱼周报#92 : The 92nd issue of Moyu Weekly is here, let’s take a look at the summary of this issue:
- Topics in this issue: Swift Foundation preview release; App accessibility webinar
- Recommended content: Some excellent blog posts, covering: Mirror API, network accessibility optimization, SwiftLint, etc.
- Touch the fish: the most complete AIGC tool set; several open source projects in the AI field; HuggingChat release; summary of Lu Qi’s speech
Introduce
Restarted to update the “iOS Reliable Internal Recommendation Topic”, and sorted out the positions that have been clearly recruited recently for your reference
For specific information, please go to: https://www.yuque.com/ioalliance/article/bhutav to view (if you have any recruitment needs, please contact iTDriverr)
Follow us
We are “Old Driver Technology Weekly”, a technical public account that continues to pursue high-quality iOS content, welcome to pay attention.
Follow politely, pay attention to [Old Driver Technology Weekly], reply to “2021”, and receive 2017/2018/2019/2020 internal reference
It also supports RSS feeds: https://github.com/SwiftOldDriver/iOS-Weekly/releases.atom .
illustrate
Indicates that a tool is needed, indicates an editor’s recommendation
Estimated reading time: Can be read quickly (1 – 10 mins); Medium (10 – 20 mins); Slow (20+ mins)
This article is transferred from: https://github.com/SwiftOldDriver/iOS-Weekly/releases/tag/%23243
This site is only for collection, and the copyright belongs to the original author.