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.
WWDC20
This week, we posted two articles from WWDC20 on our official account, and each one is great!
- UICollectionView advanced use
- Explore the logging system in Swift
news
Swift 5.3 official release
Parsifal: After releasing Swift 5.2 at the end of March, Swift 5.3 has finally been officially announced. Apple continues to make improvements and optimizations around the coding experience, Swift runtime performance and more platform support. The team also translated the official update summary for us – a picture to read Swift 5.3, download the update Xcode 12 to experience Swift 5.3.
Apple has updated its App Store review guidelines
Parsifal: With the release of iOS 14 and the upcoming macOS Big Sur on the way, Apple has also made a wave of updates to its App Store approval guidelines. Apple has updated its App Store approval guidelines to make suggestions on the terms of approval for Apple’s dad.
The article
🌟 🐢 Series: Implementing a Swift Runtime with Swift
@Herringson: Swift Runtime is not a C++ implementation, but a Swift implementation for Mac OS 9. Swift Runtime is not a C++ implementation, but a Swift implementation. Contains a number of Swift pointer manipulation techniques.
You should gain a deeper understanding of Swift Runtime by reading this series of articles, which is recommended. Belkadan.com/blog/2020/0… Belkadan.com/blog/2020/0… Belkadan.com/blog/2020/0…
Jordan Rose was part of the Swift team that worked on Bugs.swift.org until last year.
🌟 🐕 Analyze the executable file Mach-o
@Damien: Starting from the concept of Mach-O, this paper deeply analyzes the internal structure of Mach-O and the steps of loading Mach-O. Finally, the author also gives the application scenarios after analyzing Mach-O. It is a good article for students who want to understand the underlying implementation principle of iOS system.
🌟 🐢 Exploration and practice on the governance of Flutter package size
CrazyCoderShi: Flutter is a new responsive, cross-platform, high-performance mobile development framework that delivers performance, stability and consistency across multiple applications. The problem of the package volume caused by the introduction of Flutter has always been a hot topic. This paper describes in detail Meituan’s thinking and related construction on the problem of the package volume of Flutter.
🌟 🐕 Toutiao quality optimization – Graphic details page second practice
JonyFang: This article summarizes the idea and practice of optimizing the loading of the headline Detail page (WebView). The content is summarized as follows:
- Data to establish
- The measurement of optimization effect was determined as page load time
- White screen detection scheme: WebView snapshot -> Zoom -> non-white pixel detection
- The metric that determines the user’s real experience when they swipe headlines: the 95 quantile value
- Template to optimize
- Template split
- Common style CSS and logical JS are separated into separate templates and built into the client
- The client requests the interface to get the body data and complete the display by injecting the page with JS script
- The user accesses the detail page to load the local template, requests the detail page data, and injects the template
- Preload and store data by a certain policy
- Template preheating
- After the whole process is offline, local template loading optimization is performed
- Template merge. Inline JS, CSS, and images into a file to reduce IO operations when loading templates
- Template simplification. Non-essential styles and JS pull asynchronously
- Create a WebView and preload the template in the background at an appropriate time. When the user enters the detail page, the WebView loaded with template is used and the content data is injected into the page through JS. After receiving the data, the front-end rendering is performed
- Template reuse
- The details page uses the same template. When the user exits the page, the body data will be cleared. When entering the favorite page, the WebView will be reused to re-inject the corresponding body data
- Template split
- Network optimization
- The CDN to accelerate
- Features of detail page request: large traffic, basically unchanged data attributes, wide user distribution, large interface data
- Host the main and basically unchanged contents such as text, title and author column to CND
- disaster
- Multiple domain backup. The server delivers multiple CDN links. When an access exception occurs, the CDN can be switched over quickly
- Quick access. A fast dynamic timeout policy (factor 1.5, min = 1s, Max = 4s) for detailed page requests is designed to ensure that users can quickly perceive their own network problems when the network or service is abnormal.
- The CDN to accelerate
- Rendering optimization
- Server prerender
- The first screen content of the details page assembs all the HTML data of the body on the server side, and the server side directly renders the content to the client WebView.
- Client-side rendering
- Non-textual WebView content (images, videos) is rendered by native components
- Feed page Intelligent loading detail page required multiple graphs
- Server prerender
- White during optimization
- The blank screen caused by the network is resolved by the previous optimization policy
- If the WebView occupies too much memory, check whether data is injected. If the request is not retried, reload the template and inject data.
🐕 An iOS developer’s journey to the next level
IOS developers have long passed the era of being able to write two pages and get paid a lot of money, so more and more iosers should realize that they need to improve their technical skills, whether out of interest or livelihood, after all, interviews are getting harder and harder. So how do you improve? This article is actually a post on V2EX: “What are the best books on iOS development that Chinese people recommend?” . Most of the content comes from lujie2012 and other people’s answers. The answers are not just about the book, but also about iOS learning. Although the author does not completely agree with some of the answers or opinions, I still hope to help students who have problems in this aspect.
🐕 Idle fish’s exploration of the decoupling of Flutter-Native hybrid engineering
Xianyu is the first large-scale application of Flutter hybrid development in China, but it currently faces the following pain points:
- The mixed compilation of Flutter is slow, including 10min+ for Android and 20min+ for iOS
- Historical baggage in mixed stack programming may result in inconsistent data returned to the Flutter side by both iOS and Android ends
- The efficiency of integrated module development is lower than that of module development, and the test performance data of single module page cannot be expanded
Facing these pain points, the Xianyu technical team tried the following:
- Modular development
- Cross-process development
Although the two schemes can solve the problem of long compilation running time, by comparison and analysis, scheme 1 has high cost of module splitting and maintenance, while Scheme 2 has relatively low cost of module splitting and maintenance, but it has strict requirements on the running environment. Generally speaking, plan 2 can solve many problems although it has some defects.
🐕 4. Podfile parsing logic
@jonyfang: The content is divided into three parts. The first part introduces the Xcode Project structures (Workspace, Project, Target, and Build Setting) around which the Podfile configuration is based. In the second part, it describes how cocoapods-core can parse configuration files including Podfile, Podspec, and dependency lock files (such as podfile.lock) in CocoaPods. Part 3 demonstrates the nested use of Target in a Podfile.
The structure of the table of contents is as follows:
- Xcode engineering structure
- Target
- Project
- Workspace
- Scheme
- CocoaPods-Core
- Cocoapods-core file structure
- The main data structure of the Podfile
- Specification
- TargetDefinition
- Podfile
- Lockfile
- Podfile content loads
- Podfile File type
- Podfile reads files
- The Podfile is loaded in Ruby format
- YAML format Podfile loads
- Podfile content parsing
- Podfile targets configuration
- Nested use of Target
- Application demo of Abstract Target
🐎 The State of SwiftUI
Zvving: SwiftUI is expected to unify the iOS macOS iPadOS tvOS platform interface. The author encountered a series of status synchronization + Crash + stutter problems in the process of using SwiftUI.
If you want to launch SwiftUI, you can start with stable scenarios such as iOS platform widgets, while macOS tvOS cross-platform scenarios have many problems, so it is recommended to wait and see.
tool
🐎 GitHub CLI 1.0 is now available
J_Knight_ : GitHub CLI 1.0 has been released. Using the GitHub CLI you can:
- Run your entire GitHub workflow from the terminal
- Call the GitHub API to script almost anything, and you can also set a custom alias for all commands
- Connect to GitHub Enterprise Server and not just GitHub.com
This article introduces how to use the workflow from issue to release with examples, and also explains how to use gh alias set to create aliases for commands. These custom commands can also be combined freely.
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 the official account (LSJCoding) will push a message when each issue is released, welcome your attention.
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)