Old Driver iOS Weekly #226 | 2022-12-05

Original link: https://github.com/SwiftOldDriver/iOS-Weekly/releases/tag/%23226

ios-weekly

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 .

Novice recommendation

? How to fix “The compiler is unable to type-check this expression in reasonable time” error

@zoeGuo : “The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions” may be a compiler error often encountered by novices. When a problem occurs, commenting suspicious code can quickly locate it Problem, the error can be solved by making a reasonable simplification of the expression in the problem code. The article provides some good examples of decomposing and simplifying expressions, which will be helpful for novice developers.

article

??C++ exception handling ABI

@ChengzhiHuang : Although this article introduces C++ Exception handling, the NSException that iOS developers are very familiar with is actually thrown by calling __cxa_throw() in the objc_exception_throw() method, and __cxa_throw() is actually a C++ exception throw. Therefore, it can be said that the throwing link and subsequent processing of NSException are exactly the same as direct throw in C++. We have also introduced the content related to Stack unwinding before. You can understand the content related to unwinding before reading this article. This will give us a deeper understanding of stack backtracking and how to implement Exception handling. You can even try to捕获没有被catch 的NSException 防止崩溃并恢复到合适的调用栈让程序运行下去a similar online solution. The general content of this article is as follows:

  • Introduces a simplified version of the exception handling process (from throw to catch)
  • Level 1 Base ABI, which describes the language-independent Stack unwinding part, defines the Unwind * API, and llvm also has a corresponding implementation of libunwind
  • Level 2 C++ ABI, defines the corresponding API beginning with __cxa_* , the __cxa_throw() mentioned above is defined at this level

? Four Discussions on Domain Driven Design

@莲叔: Many students study “Software Engineering” and read “Mythology of the Man-Month” in school, and they are often full of fantasies about complex software engineering. But after graduating and joining an Internet company, I found that the rhythm, structure and implementation of most projects seem to be far from theoretical knowledge. Slowly we no longer pay attention to those great design ideas, only agile development, dynamics and hot fixes are left in our minds. This article summarizes several aspects of domain-driven design thinking from a slightly theoretical perspective, what problems are used to solve them, and how to solve them. After reading it, I feel like a spring breeze, not only for the study of this theory, but also for getting inspiration from understanding how DDD solves the complexity of software engineering, and gaining a new perspective to look at the current business and projects at hand. I recommend that you read it patiently, it will be inspiring.

? Testing async/await exceptions

@Smallfly : Unit testing is an important means to ensure the robustness of the code. Apple has successively provided exception detection methods such as XCTAssertThrowsError(expression:) and @frozen enum Result<Success, Failure> where Failure : Error , but for protocols like async/await Cheng is not friendly. This article introduces an async/await style exception testing method, which can simplify some repetitive codes and is recommended for students in need to read.

? Alipay client experience measurement and diagnosis

@Crazy : This article is an excellent work explaining the performance monitoring design scheme. It writes the monitoring scheme and processing scheme for several time-consuming scenarios on the client side. Although this article is explained from the perspective of Android developers, but The design ideas and analysis process are worthy of reference for all client developers. This article explains how Alipay’s performance monitoring is implemented through the following four aspects:

  • Scenario Metrics
  • Improved scene measurement accuracy
  • Scenario Performance Diagnosis
  • APM Performance Platform

Among them, the explanations about scene measurement methods, scene measurement accuracy improvement and APM performance platform are worth reading by all client developers, and the explanations about scene performance diagnosis are worth reading carefully by Android developers.

? Stable Diffusion with Core ML on Apple Silicon

@吃笑饮食酸: Since its public debut in August 2022, Stable Diffusion has been adopted by a vibrant community of artists, developers, and enthusiasts to create unprecedented visual content simply by typing in text. Through Apple’s further optimization of the Apple Silicon chip, the Core ML Stable Diffusion model can take full advantage of the neural engine in the M-series chips and the advantages of Apple’s GPU architecture. To get started, you can visit the Core ML Stable Diffusion code repository for detailed instructions on benchmarking and deployment.

? Troubleshooting experience of a WebKit bug that caused the applet page to fail to jump

@水水: The author started from receiving an online problem feedback that a small program called my.navigateTo() after calling my.redirectTo() did not respond and could not jump to the next page. The process caused by a WebKit bug is fully explained. It is a relatively rare problem that is difficult to investigate and has a deep root cause. The article records the thinking during the investigation, and hopes it can also be used as a reference for readers. The author also reminds us at the end: people’s fixed cognition is not necessarily right~

audio and video

? How to contribute a new feature to Swift?

@Cooper Chen : As we all know, the Swift language is a new generation of development language. Its open source nature enables developers to provide new features more flexibly and efficiently. This video describes in detail how developers contribute new features to Swift. Among them A detailed explanation of the process steps is given for developers from submitting a proposal to launching the final solution. For developers who want to provide suggestions and ideas to the Swift community, the video also gives the following suggestions:

  • Regularly read and browse Swift Forms
  • Actively give feedback in the community and keep abreast of what features the community is looking for
  • Share your thoughts and make them known to others
  • Try it yourself or collaborate with other developers
  • Follow other people’s feedback

Moyu Weekly

@探鱼周报#77 : The 77th issue of Moyu Weekly is here, let’s take a look at the summary of this issue:

  • Topic of this issue: Christmas is approaching, please prepare your App;  Developer Design and Development Accelerator|How to support handles in games and extend your App experience on the iPhone lock screen
  • This week’s study: the difference between class_rw_t and class_ro_t, knowledge summary for interviews
  • Content recommendation: Recommendation of excellent articles in Swift, involving coroutines, type conversion and explanation of inlinable keywords
  • Touch the fish: The toolbox tool “Ape Ruyi” launched by CSDN; Roadmap.sh is a website that summarizes the technology roadmap; how email works, a picture to tell you; regular expression quick reference card

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 editor’s recommendation

Estimated reading time: ? Can be read quickly (1 – 10 mins); ? Moderate (10 – 20 mins); ? Slow (20+ mins)

This article is transferred from: https://github.com/SwiftOldDriver/iOS-Weekly/releases/tag/%23226
This site is only for collection, and the copyright belongs to the original author.