Original link: https://github.com/SwiftOldDriver/iOS-Weekly/releases/tag/%23206
The old driver 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 it to us in Issues , and we will deal with it as soon as possible. Remember to write the reason for your recommendation. Suggestions and comments are also welcome to Issues .
“WWDC22 Internal Reference”
A total of 13 articles were updated last week, and the quality of each article is very high. Due to the space problem, I recommend three articles at the beginning that may be more interesting to everyone, and the others are put at the end of the weekly report~
? 【WWDC22 10092】Meet Passkey
Apple has always been widely praised for its strict emphasis on user privacy and excellent privacy protection capabilities. Passkey is a complete solution proposed by Apple in terms of user privacy protection and information security. This article will walk you through what, why and how to use this solution.
? 【WWDC22 110357/110358】Swift Regex: A long-planned regular optimization
Chris’s five-year-old pie, Swift Regex, is finally here! A way of handling strings that promises to surpass Perl, a way of building regular expressions that is both concise and intuitive, and an abstract model that makes getting Unicode encoding right a breeze. Swift Regex walks slowly, but the Lord will bless him who believes in it. (Official text: So we go out and evangelize our clearly superior approach to anyone who will listen. Adoption is slow but promising.)
? 【WWDC22 10054】New Navigation Scheme for SwiftUI
Navigation is an integral feature of any app. SwiftUI brought us NavigationView when it was released to support simple navigation scenarios, but it has many shortcomings. Fortunately, WWDC22 brought us NavigationStack and NavigationSplitView to solve various pain points.
This article uses a real example “Three Hundred Poems of Tang Dynasty” to describe the applicable scenarios and usage suggestions of the new scheme in detail, to help readers become familiar with and migrate to the new navigation scheme.
Recommended for beginners
? How to Start iOS Development Career
@ Laofeng : The author lists the main knowledge points of iOS development through a series of articles, mainly including the following:
- The Swift Language: Learning Resources and How to Learn
- Build UI interface: Using Interface Builder&Build programmatically; UIKit&SwiftUI
- iOS basic concepts: data storage, network requests, multithreading, memory management
- Testing: unit testing, integration testing, snapshot testing, application flow testing
- Architecture & Tools: Unfinished
? Step-by- step implementation of source-based Swift code coverage
In this short article, the author will introduce you to the best practices he found while researching Swift code coverage detection schemes, including:
- How to generate *.profraw files and measure code coverage via command line
- How to call C/C++ methods in a Swift App project
- How to measure code coverage of a full Swift App project in Xcode
article
? ?Bazel- based iOS Monorepo Engineering Practice
@JonyFang : A practical technical sharing, which mainly introduces BILIBILI’s Bazel-based iOS Monorepo engineering practice. The content structure is as follows:
- Introduce the background of BILIBILI client project development mode evolution;
- Answer What is Monorepo? What are the established Monorepo tools?
- Introduce the reasons for selecting Bazel, and focus on the advantages brought by Monorepo and Bazel;
At present, the Monorepo mode of the B station client is still evolving. In the future, more and more self-developed rules for compilation and optimization will be implemented into our iOS projects. At present, the distributed compilation capability has also been put on the agenda. Students who are interested in Monorepo or Bazel are welcome to have technical discussions with us, and welcome to join our CI/CD team to deeply participate in the transformation and construction of the iOS-side Monorepo engineering system.
?Watermelon video iOS player technology refactoring
@ChengzhiHuang : There are various video themes in the watermelon video, and the business logic is heavily coupled, which is also the core module of the business. This article focuses on the reconstruction of the service player (not the VideoEngine layer). By splitting the player into three layers: a minimalist player, a basic player, and a service player; In the end, it has achieved good benefits in terms of maintainability, performance, business, etc. The specific layering scheme and ideas can be used for reference, but in the end, the most appropriate division must be selected according to the complexity of the business.
Using the ‘some’ and ‘any’ keywords to reference generic protocols in Swift 5.7
@zvving : Compared with ObjC, Swift protocol brings richer practical scenarios and stricter type information. When we follow Apple’s advice and try to implement protocol-oriented programming in our projects, in scenarios such as parameter types and generic associations, type information brings a lot of restrictions, which leads us to apply type erasure in large quantities, which can solve the problem. It also brings more comprehension costs.
Swift 5.1 introduced the some keyword (opaque return types) to make protocol-based return types easier to use. Swift 5.7 goes a step further, allowing some to be more flexible in application scenarios such as function parameters and generic types, while introducing the any keyword to bring official type erasure semantics for use in type container scenarios. So far, the some keyword is used in scenarios where the instance type is more specific, and the any keyword is used in the type container scenario. Swift truly achieves simplicity and flexibility in protocol-oriented programming.
? App Store Server API Practice Summary
@J_Knight_ : This article shares the interface of Apple’s open App Store Server API:
- Query user order data
- Query user historical data
- Query user in-app purchase refund
- Query user subscription status
- Submit Fraud Prevention Information
The test server addresses of the online environment and sandbox environment are also introduced. Since the calls of these interfaces need to be authorized by JWT (JSON Web Token), the specific operations of this authorization method, such as generating keys and signatures, are also introduced. The second half of the article provides examples of calling these interfaces and related information about error codes, etc.
Further reading: [WWDC22 10040] Explore In-App Purchase integration and migration
? Announcing the Language Workgroup JUNE 15, 2022Ted KremenekTed Kremenek
@藝藝蒼锵: Since Swift became an open source project, the Swift community has done a lot of work together. Now, the Language Working Group will be launched, which will have primary responsibility for overseeing the language and standard library. With a working group dedicated to language development, the core team will be more invested in the overall oversight and direction of the project. Core team members will serve as stewards, coordinating the work of various working groups and developing strategies for building a more active open source project and surrounding community.
? SwiftUI State Management System Guide
@EyreFree : SwiftUI differs from Apple’s previous UI frameworks not only in how views and other UI components are defined, but also in how view-level state is managed throughout the application that uses it. Instead of using delegates, data sources, or any of the other state management patterns common in imperative frameworks like UIKit and AppKit, SwiftUI comes with some property wrappers that allow us to declare exactly how our data is being observed, rendered by our views and change. This guide provides a good overview of SwiftUI’s various state processing mechanisms. The concepts emphasized in this article cover most of the use cases for all SwiftUI-based state processing. It is recommended for those interested in SwiftUI to read.
? WWDC 2022 Viewing Guide
@Barney This year’s WWDC has 175 sessions and tons of new features to learn, just watching the video takes a lot of time. Too many things to grasp the point? It doesn’t matter, it is better to start with the ones you are interested in according to the classification of this article.
? Rendering SwiftUI views within UITableView or UICollectionView cells on iOS 16
@JimQ : This year’s WWDC finally brought the ability to render SwiftUI views in UITableView/UICollectionView Cells, but it is not completely mixed, limited to Cells (for example, UITableViewHeaderFooterView cannot be used), and UIHostConfiguration is required between Cells and SwiftUI. For bridge support, use a new UIHostConfiguration object to wrap the SwiftUI view and assign it to cell.contentConfiguration. This article from John Sundell walks you through more details and making the most of this new feature.
? Google I/O Extended | The status of Flutter supported by Flutter games and full-platform official versions
@Speedboy : At Google I/O this year, Google mainly showed Flutter’s support for game development and the ability to support all platforms. Google uses a pinball game to demonstrate how Flutter provides game development capabilities through the Skia rendering engine and the Flame SDK. In 3.0, Flutter improves application stability on macOS and Linux, allowing developers to more flexibly utilize the underlying logical operating system on the basis of sharing as much UI and logic as possible.
? wakeup in XNU
@水水: Readers who are concerned about performance may encounter that there is a type of weakup that is killed by the system, and because the collected logs are not enough to locate the problem, this article uses another way to solve this problem. An overall introduction to what a weakup is, how the system is counted and, crucially, how to govern.
- Why count wakeup
- what is wakeup
- How wakeup is counted
- wakeup governance
- Monitoring and Anti-Deterioration
? What’s new in Swift 5.7
@AidenRao : Swift 5.7 has changed a lot, including regular expressions, if let
shorthand syntax, and consistent changes around the any
and some
keywords. In this article, the author will introduce these new features through some examples.
Chinese translation: 【WWDC22 110354】Introduction to new features of Swift
? Flutter high latency rendering pipeline scheduling
@CrazyCoderShi : Flutter is known for its high performance for a long time, but you may be wondering what engine is the lag on Flutter and how to solve it. In this article, the U4 kernel team will take you to reveal the rendering process under the Flutter system, and find out the reason for the lag.
WWDC22 internal reference update
? 【WWDC22 110379】Create a more responsive media app
This session mainly made asynchronous optimizations to the synchronous APIs in AVFoundation
that were not very reasonable. At the same time, async/await was applied to more APIs, making the APIs more secure and easy to use. The modules involved include video screenshots, video editing, and custom resource loading.
? 【WWDC22 10002】Using Virtualization to build virtual machines has never been easier
This article introduces the types of platform virtualization technologies and analyzes the virtualization solutions on macOS. Through Virtualization.framework and command-line tools based on this framework, we create usable macOS virtual machines, Linux virtual machines (GUI), Linux (CLI), and experience the powerful performance of modern virtual machines. Using Virtualization to create your own virtual machine has never been easier!
? 【WWDC22 110341】SMS Filter Principle and Update
This article will mainly focus on the new features of the IdentifyLookup
framework in iOS 16. The full text is divided into 3 parts:
- The first part is to review the development of the entire SMS filtering API.
- The second part is an introduction to the principle of SMS filtering.
- The last part is a simple Demo example practice.
? 【WWDC22 10049】Explore the new features of WKWebView in iOS 16
This article mainly explores the new features of WKWebView in iOS 16. The full text is mainly divided into 4 parts:
- The first part is 3 new ways to interact with web content, and 20 new CSS viewport units and find interaction functions.
- The second part is to add the function of blocking the displayed content of a specific URL.
- The third part is the new feature of encrypted media in iPadOS.
- The fourth part is to support debugging Web pages embedded in App in third-party browsers.
? 【WWDC22 110350】Visualization and optimization of Swift concurrency
This article mainly discusses the optimization of concurrent code in Swift, and introduces a visualization tool provided by Instrument 14. The content of the session can be divided into 3 parts:
- 1. Review Swift Concurrency Code Basics
- 2. Combined with code snippets to show how to use Instrument to solve performance problems, including Main Actor blocking and Actor competition
- 3. Finally, some potential issues with Swift concurrency are discussed including thread pool exhaustion and continuation misuse
? 【WWDC22 110354】Introduction to new features of Swift
Swift has always strived to make programming easier and iteratively continues to do so. This article will introduce the new features of Swift 5.7, mainly divided into the following five parts:
-
- Community Updates
-
- Swift Package Manager plugin
-
- Swift low-level performance optimization
-
- Swift Concurrency Model
-
- Swift language optimization
? 【WWDC22 10065】Plug and Play: Add Apple frameworks to your Unity game project
This article will help developers how to quickly integrate some of Apple’s native function plug-ins in Unity applications or games to enhance the experience of the work. This WWDC, Apple brought us six plugins based on the Unity version: Apple.Core, Game Center, Game Controller, Accessibility, Core Haptics and PHASE. We will introduce their functions separately, and how to quickly compile and import them into the developer’s project. At the end of the article, some scenarios and points of attention for using these plug-ins are also given.
? 【WWDC22 110336】 New features of Screen Time API
This article will introduce the new features of the Screen Time API in iOS 16 and the functions that can be implemented based on it. The full text is divided into three parts:
-
- Review Screen Time API features in iOS 15
-
- Introduction to the new features of Screen Time API in iOS 16
-
- Practice of new features of Screen Time API
? 【WWDC22 10115/10119】Optimize CoreData & CloudKit implementation
This article will combine the developer’s personal project case, and aims to cover three important aspects of the development process through unit testing, Instruments, and log collection: exploration, analysis, and feedback, helping developers optimize implementation solutions and make better product. At the same time, learn about the synchronization process and related system services of CloudKit.
? 【WWDC22 10040】 Explore In-App Purchase integration and migration
This article focuses primarily on the App Store Server API and App Store Server Notifications. From last year’s WWDC21, Apple launched StoreKit v2, App Store Server API v1 and App Store Server Notifications v2. Based on these functions, this year’s WWDC22 added some new APIs and some service optimizations. In addition, in response to some doubts about these new features, such as JWT/JWS, compatibility, security, subscription notifications, integration and migration, etc., Apple has provided detailed answers, and also provides a lot of best practice cases and Optimization suggestions.
Moyu Weekly
@Moyu Weekly #57 : The 57th issue of Moyu Weekly is here. Some changes have been made to the layout of this issue. Let’s take a look at the summary of this issue:
- Topics in this issue: WWDC22 Lecture Highlights, Apple Summer Camp Course Returns
- Learning this week: Xcode Playground Tips
- Content recommendation: The Apple Developer Conference ends, introducing some new technologies and new content launched by WWDC22
- Touch the fish: Apple Logo Artwork, which includes Apple’s unique and colorful media version of the Logo
push in
The Old Driver Weekly Team has combined with the Knowledge Collection and the SwiftGG Translation Team to include a reliable internal referral position.
If you want to find a job , click here: https://www.yuque.com/iosalliance/article/bhutav
If you want to recruit , click here: https://www.yuque.com/iosalliance/article/ycyhf3
Of course, you are also welcome to pay attention to each of our weekly reports, and we will update the editorial posts at the bottom of each weekly report in a timely manner.
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 Youli, pay attention to [Old Driver Technology Weekly], reply to “2021”, and receive 2017/2018/2019/2020 internal reference
Also supports RSS feeds: https://github.com/SwiftOldDriver/iOS-Weekly/releases.atom .
illustrate
? means a tool is needed, ? means editor’s recommendation
Estimated reading time: ? Read quickly (1 – 10 mins); ? Moderate (10 – 20 mins); ? Slow (20+ mins)
This article is reprinted from: https://github.com/SwiftOldDriver/iOS-Weekly/releases/tag/%23206
This site is for inclusion only, and the copyright belongs to the original author.