Old driver iOS weekly, just for you to present valuable information.

You can also contribute to the project, if you find valuable information, articles, tools, etc., please send it to us in Issues, we will deal with it as soon as possible. Be sure to include a reason for your recommendation. Suggestions and comments are also welcome to Issues.

The novice recommended

🐕 3 steps to speed up storyboard

Speedboy: Storyboard is widely used in iOS as a way of controlling viewControllers. This article briefly explains how to quickly manage your viewcontroller using storyboard.

The article

🌟 🐕 TrampolineHook – Supports variable parameter hooks to solve stack contamination problems

This article is the latest in a series of articles on the TrampolineHook framework. TrampolineHook is a central redirection framework that replaces/intercepts all the functions you want with a single function. If you are not familiar with this library, you can look at the previous articles:

  • Bridge based full method Hook scheme – explore apple main thread check implementation
  • Bridge – based full method Hook scheme (2) – new upgrade
  • Full method Hook scheme based on bridge (3) – TrampolineHook

This article mainly talks about the library in the previous implementation of a mistake, about the problem of context pollution, this article from the assembly point of view more in-depth explanation of this problem, but does not require readers to understand the assembly content, interested students can take a look.

🌟 🐕 What is the difference between mobile front-end development and Web front-end development?

Zhang Jiafu: Front-end technology has only been developed for a few years. If the first decade was the era of the PC front end, the second decade must be the era of the mobile front end. Especially with the development of network system, mobile devices have gained unprecedented popularity worldwide. In the field of front-end, Hybird Web, React Native, Weex, Flutter and a series of new mobile front-end technologies have sprung up like spring rain. In this article from the technology department of Alibaba New Retail Department, the author shared his understanding of “mobile front-end development and Web front-end development”, including the history of front-end development review, the past and present life of mobile front-end hybrid technology and the discussion of the future back to the roots.

🌟 🐕 How the SwiftUI DSL Works

@Lianshu: SwiftUI is the most exciting feature in recent big versions of Swift. Although many students have reached an immature judgment after testing the waters, this does not affect its positioning of the future UI development mode. In this article, the author tries to talk about some key technologies in SwiftUI implementation, mainly describes the Function Builder mechanism, the article is relatively easy to understand, not much content, more suitable for beginners to learn.

🐎 🚧 A Type-Safe FileWrapper

@xiaofei86: In Document Based Apps, NSDocument, as the most important base class, provides automatic saving, thread safety, iCloud conflict resolution and other functions. NSDocument can hold file Data of both types, Data and FileWrapper. FileWrapper is a container for user-defined file types. This article briefly introduces the application of FileWrapper through examples. If you are interested, you can read the original text for more information and learn more about the development guide of Document Based Apps from the official Apple documentation.

🐎 Dealing with memory limits in iOS app extensions

Notification Extension and Share Extension have been hot topics in iOS in the last two years. It seems that the two years have been hot, and people don’t pay much attention to them. Apple doesn’t continue to focus on this area, and there are few framework updates.

The author ran into a memory ceiling issue, with the Notification Extension supporting a maximum of 24 MB of memory, and the Share Extension supporting a maximum of 120 MB of memory. The most likely areas of development to encounter memory ceiling problems are images or videos, and the authors use some interesting ways to get around this limitation.

🐕 How We Use Feature Flagging on iOS

Feature Flagging (also known as Feature Toggle, Flip, etc.) is a way to turn a Feature on or off a control line, usually in the form of a profile. The author of this article uses WordPress as an example to show how to implement Feature Flags in iOS by configuring Build Configurations, etc. WordPress-ios is an open source project. You can read the source code here.

🐎 Decode and Flatten JSON with Dynamic Keys Using Decodable

@Siniang: Sometimes JSON files sent from the backend are in the form of dynamic keys. What about in Codable? This article introduces how the structure of dynamic keys should be resolved and encapsulated.

code

🌟 InterposeKit

@ EyreFree: InterposeKit is a library that helps us Swizzle in Swift quickly and elegantly. it was written by Peter Steinberger, a name that may not be familiar to you, but you may have heard of his other open source library, Aspects. InterposeKit is written in pure Swift 5.2, well documented and thoroughly tested. It can be used with objective-C instance methods and Swift functions decorated with @objc Dynamic. Recommended for those who have Swizzle needs in Swift, here are some key points:

  • Interpose directly modifies the implementation of the method, which is better than basedselectorIn a better way;
  • You can do this by callingrevert()Easy implementation of hook undo;
  • Pure Swift implementation instead of using inefficientNSInvocation;
  • No type checking, which introduces some crash risk but is also more flexible;
  • The result type must be specified manually twice, which is a way to avoid usingNSInvocationOr an eclectic assembly;
  • Lazy insertion when the class is loaded at run time.

push

Senior driver Weekly team combined knowledge collection and SwiftGG Translation group included a reliable internal promotion position.

If you want to looking for a job, click here: www.yuque.com/iosalliance…

If you want to recruit people, click here: www.yuque.com/iosalliance…

Of course, you are also welcome to pay attention to our weekly report, we will update the editorial post at the bottom of each weekly report.

Pay attention to our

We have opened an official account, and every issue will be released on the official account (OldDriverWeekly), welcome to follow.

RSS feeds are also supported: github.com/SwiftOldDri… .

instructions

🚧 indicates that a tool is required, and 🌟 indicates that editing is recommended

Estimated reading time: 🐎 in a short time (1-10 mins); 🐕 medium (10-20 mins); 🐢 slow (20+ mins)